diff --git a/module/applications/settings/components/settingsActionsView.mjs b/module/applications/settings/components/settingsActionsView.mjs index a905e824..f77c5fce 100644 --- a/module/applications/settings/components/settingsActionsView.mjs +++ b/module/applications/settings/components/settingsActionsView.mjs @@ -4,13 +4,14 @@ import DHActionConfig from '../../sheets-configs/action-config.mjs'; const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api; export default class DhSettingsActionView extends HandlebarsApplicationMixin(ApplicationV2) { - constructor(resolve, reject, title, name, img, description, actions) { + constructor(resolve, reject, title, name, icon, img, description, actions) { super({}); this.resolve = resolve; this.reject = reject; this.viewTitle = title; this.name = name; + this.icon = icon; this.img = img; this.description = description; this.actions = actions; @@ -23,7 +24,7 @@ export default class DhSettingsActionView extends HandlebarsApplicationMixin(App static DEFAULT_OPTIONS = { tag: 'form', classes: ['daggerheart', 'setting', 'dh-style'], - position: { width: '400', height: 'auto' }, + position: { width: 440, height: 'auto' }, actions: { editImage: this.onEditImage, addItem: this.addItem, @@ -46,6 +47,7 @@ export default class DhSettingsActionView extends HandlebarsApplicationMixin(App async _prepareContext(_options) { const context = await super._prepareContext(_options); context.name = this.name; + context.icon = this.icon; context.img = this.img; context.description = this.description; context.enrichedDescription = await foundry.applications.ux.TextEditor.enrichHTML(context.description); @@ -55,8 +57,9 @@ export default class DhSettingsActionView extends HandlebarsApplicationMixin(App } static async updateData(event, element, formData) { - const { name, img, description } = foundry.utils.expandObject(formData.object); + const { name, icon, description } = foundry.utils.expandObject(formData.object); this.name = name; + this.icon = icon; this.description = description; this.render(); @@ -65,6 +68,7 @@ export default class DhSettingsActionView extends HandlebarsApplicationMixin(App static async saveForm(event) { this.resolve({ name: this.name, + icon: this.icon, img: this.img, description: this.description, actions: this.actions diff --git a/module/applications/settings/homebrewSettings.mjs b/module/applications/settings/homebrewSettings.mjs index 08b4cf4e..e516be03 100644 --- a/module/applications/settings/homebrewSettings.mjs +++ b/module/applications/settings/homebrewSettings.mjs @@ -76,6 +76,7 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli reject, game.i18n.localize('DAGGERHEART.SETTINGS.Homebrew.downtimeMoves'), move.name, + move.icon, move.img, move.description, move.actions @@ -87,6 +88,7 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli await this.settings.updateSource({ [`restMoves.${type}.moves.${id}`]: { name: data.name, + icon: data.icon, img: data.img, description: data.description } diff --git a/templates/settings/components/action-view.hbs b/templates/settings/components/action-view.hbs index 6c01b072..99e43122 100644 --- a/templates/settings/components/action-view.hbs +++ b/templates/settings/components/action-view.hbs @@ -1,18 +1,17 @@
+
+ + +
+ +
+
+
{{localize "Description"}} - + {{{ enrichedDescription }}}
- {{!--
- {{localize "Actions"}} - -
- {{#each this.actions as |action index|}} - {{> "systems/daggerheart/templates/settings/components/settings-item-line.hbs" action type="actions" id=index }} - {{/each}} -
-
--}}
\ No newline at end of file