fix style problems in bottom sheets and enhance damage and action dialogs (#325)

This commit is contained in:
Murilo Brito 2025-07-12 09:44:14 -03:00 committed by GitHub
parent b6195127fe
commit dee398347f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 129 additions and 70 deletions

View file

@ -11,11 +11,14 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
static DEFAULT_OPTIONS = {
tag: 'form',
id: 'roll-selection',
classes: ['daggerheart', 'views', 'damage-selection'],
classes: ['daggerheart', 'dialog', 'dh-style', 'views', 'damage-selection'],
position: {
width: 400,
height: 'auto'
},
window: {
icon: 'fa-solid fa-dice'
},
actions: {
submitRoll: this.submitRoll
},
@ -34,9 +37,15 @@ export default class DamageDialog extends HandlebarsApplicationMixin(Application
}
};
get title() {
return game.i18n.localize('DAGGERHEART.EFFECTS.ApplyLocations.damageRoll.name');
}
async _prepareContext(_options) {
const context = await super._prepareContext(_options);
context.title = this.config.title;
context.title = this.config.title
? this.config.title
: game.i18n.localize('DAGGERHEART.EFFECTS.ApplyLocations.damageRoll.name');
context.extraFormula = this.config.extraFormula;
context.formula = this.roll.constructFormula(this.config);
return context;