Skip to content

Commit

Permalink
More AppV2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mclemente committed May 28, 2024
1 parent e83a821 commit 93c4588
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
7 changes: 2 additions & 5 deletions src/module/forms/BehaviorSettings.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { t } from "../utils.js";
import { HealthEstimateSettingsV2 } from "./templates/BaseV2.js";

export default class HealthEstimateBehaviorSettings extends HealthEstimateSettingsV2 {
static DEFAULT_OPTIONS = {
id: "health-estimate-behavior-form",
actions: {
reset: HealthEstimateBehaviorSettings.reset,
},
window: {
icon: "fas fa-gear",
title: "healthEstimate.core.menuSettings.behaviorSettings.plural",
},
};

Expand All @@ -19,10 +20,6 @@ export default class HealthEstimateBehaviorSettings extends HealthEstimateSettin
...HealthEstimateSettingsV2.PARTS,
};

get title() {
return `Health Estimate: ${t("core.menuSettings.behaviorSettings.plural")}`;
}

_prepareContext(options) {
return {
alwaysShow: this.prepSetting("alwaysShow"),
Expand Down
8 changes: 3 additions & 5 deletions src/module/forms/StyleSettings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sGet, sSet, t } from "../utils.js";
import { sGet, sSet } from "../utils.js";
import { HealthEstimateSettingsV2 } from "./templates/BaseV2.js";

export default class HealthEstimateStyleSettings extends HealthEstimateSettingsV2 {
Expand All @@ -7,6 +7,7 @@ export default class HealthEstimateStyleSettings extends HealthEstimateSettingsV
path = "core.menuSettings";

static DEFAULT_OPTIONS = {
id: "health-estimate-style-form",
actions: {
reset: HealthEstimateStyleSettings.reset,
},
Expand All @@ -15,6 +16,7 @@ export default class HealthEstimateStyleSettings extends HealthEstimateSettingsV
},
window: {
icon: "fas fa-palette",
title: "healthEstimate.core.menuSettings.styleSettings.plural",
},
};

Expand All @@ -26,10 +28,6 @@ export default class HealthEstimateStyleSettings extends HealthEstimateSettingsV
...HealthEstimateSettingsV2.PARTS,
};

get title() {
return `Health Estimate: ${t("core.menuSettings.styleSettings.plural")}`;
}

_prepareContext(options) {
return {
fontFamily: this.prepSelection("fontFamily"),
Expand Down
6 changes: 2 additions & 4 deletions src/module/forms/templates/BaseV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ export class HealthEstimateSettingsV2 extends HandlebarsApplicationMixin(Applica
],
};

_initializeApplicationOptions(options) {
options = super._initializeApplicationOptions(options);
options.uniqueId = `${this.constructor.name}`;
return options;
get title() {
return `Health Estimate: ${game.i18n.localize(this.options.window.title)}`;
}

prepSelection(key) {
Expand Down

0 comments on commit 93c4588

Please sign in to comment.