mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 04:01:06 +01:00
style countdown interface, application and ownership dialog
This commit is contained in:
parent
36c952faff
commit
f7f70f54bb
8 changed files with 71 additions and 35 deletions
|
|
@ -11,7 +11,10 @@ export default class OwnershipSelection extends HandlebarsApplicationMixin(Appli
|
|||
|
||||
static DEFAULT_OPTIONS = {
|
||||
tag: 'form',
|
||||
classes: ['daggerheart', 'views', 'ownership-selection'],
|
||||
classes: ['daggerheart', 'views', 'dialog', 'dh-style', 'ownership-selection'],
|
||||
window: {
|
||||
icon: 'fa-solid fa-users'
|
||||
},
|
||||
position: {
|
||||
width: 600,
|
||||
height: 'auto'
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export default class CountdownEdit extends HandlebarsApplicationMixin(Applicatio
|
|||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ['daggerheart', 'dh-style', 'countdown-edit'],
|
||||
classes: ['daggerheart', 'dialog', 'dh-style', 'countdown-edit'],
|
||||
tag: 'form',
|
||||
position: { width: 600 },
|
||||
window: { icon: 'fa-solid fa-clock-rotate-left' },
|
||||
|
|
@ -142,18 +142,20 @@ export default class CountdownEdit extends HandlebarsApplicationMixin(Applicatio
|
|||
this.updateSetting({ [`countdowns.${button.dataset.countdownId}`]: data });
|
||||
}
|
||||
|
||||
static async #removeCountdown(_, button) {
|
||||
static async #removeCountdown(event, button) {
|
||||
const { countdownId } = button.dataset;
|
||||
|
||||
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
||||
window: {
|
||||
title: game.i18n.localize('DAGGERHEART.APPLICATIONS.CountdownEdit.removeCountdownTitle')
|
||||
},
|
||||
content: game.i18n.format('DAGGERHEART.APPLICATIONS.CountdownEdit.removeCountdownText', {
|
||||
name: this.data.countdowns[countdownId].name
|
||||
})
|
||||
});
|
||||
if (!confirmed) return;
|
||||
if (!event.shiftKey) {
|
||||
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
||||
window: {
|
||||
title: game.i18n.localize('DAGGERHEART.APPLICATIONS.CountdownEdit.removeCountdownTitle')
|
||||
},
|
||||
content: game.i18n.format('DAGGERHEART.APPLICATIONS.CountdownEdit.removeCountdownText', {
|
||||
name: this.data.countdowns[countdownId].name
|
||||
})
|
||||
});
|
||||
if (!confirmed) return;
|
||||
}
|
||||
|
||||
if (this.editingCountdowns.has(countdownId)) this.editingCountdowns.delete(countdownId);
|
||||
this.updateSetting({ [`countdowns.-=${countdownId}`]: null });
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
|
|||
static DEFAULT_OPTIONS = {
|
||||
id: 'countdowns',
|
||||
tag: 'div',
|
||||
classes: ['daggerheart', 'dh-style', 'countdowns'],
|
||||
classes: ['daggerheart', 'dh-style', 'countdowns', 'faded-ui'],
|
||||
window: {
|
||||
icon: 'fa-solid fa-clock-rotate-left',
|
||||
frame: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue