From 93c45886bfd2a599c45df680a6fc6d1b36915886 Mon Sep 17 00:00:00 2001 From: Matheus Clemente Date: Tue, 28 May 2024 02:17:04 -0300 Subject: [PATCH] More AppV2 changes --- src/module/forms/BehaviorSettings.js | 7 ++----- src/module/forms/StyleSettings.js | 8 +++----- src/module/forms/templates/BaseV2.js | 6 ++---- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/module/forms/BehaviorSettings.js b/src/module/forms/BehaviorSettings.js index cd8dce4..a438848 100644 --- a/src/module/forms/BehaviorSettings.js +++ b/src/module/forms/BehaviorSettings.js @@ -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", }, }; @@ -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"), diff --git a/src/module/forms/StyleSettings.js b/src/module/forms/StyleSettings.js index c9af13f..b18008e 100644 --- a/src/module/forms/StyleSettings.js +++ b/src/module/forms/StyleSettings.js @@ -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 { @@ -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, }, @@ -15,6 +16,7 @@ export default class HealthEstimateStyleSettings extends HealthEstimateSettingsV }, window: { icon: "fas fa-palette", + title: "healthEstimate.core.menuSettings.styleSettings.plural", }, }; @@ -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"), diff --git a/src/module/forms/templates/BaseV2.js b/src/module/forms/templates/BaseV2.js index ebeb8aa..04424af 100644 --- a/src/module/forms/templates/BaseV2.js +++ b/src/module/forms/templates/BaseV2.js @@ -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) {