mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Fixed SelectActionType dialog
This commit is contained in:
parent
c3d71f0c39
commit
d6049ed230
2 changed files with 10 additions and 18 deletions
|
|
@ -88,26 +88,18 @@ export default class DhSettingsActionView extends HandlebarsApplicationMixin(App
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectActionType() {
|
async selectActionType() {
|
||||||
const content = await foundry.applications.handlebars.renderTemplate(
|
(await foundry.applications.api.DialogV2.input({
|
||||||
|
window: { title: game.i18n.localize('DAGGERHEART.CONFIG.SelectAction.selectType') },
|
||||||
|
content: await foundry.applications.handlebars.renderTemplate(
|
||||||
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
||||||
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
||||||
),
|
),
|
||||||
title = 'Select Action Type',
|
ok: {
|
||||||
type = 'form',
|
label: game.i18n.format('DOCUMENT.Create', {
|
||||||
data = {};
|
type: game.i18n.localize('DAGGERHEART.GENERAL.Action.single')
|
||||||
return Dialog.prompt({
|
})
|
||||||
title,
|
}
|
||||||
label: title,
|
})) ?? {};
|
||||||
content,
|
|
||||||
type,
|
|
||||||
callback: html => {
|
|
||||||
const form = html[0].querySelector('form'),
|
|
||||||
fd = new foundry.applications.ux.FormDataExtended(form);
|
|
||||||
foundry.utils.mergeObject(data, fd.object, { inplace: true });
|
|
||||||
return data;
|
|
||||||
},
|
|
||||||
rejectClose: false
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static async addItem() {
|
static async addItem() {
|
||||||
|
|
|
||||||
|
|
@ -440,7 +440,7 @@ export default function DHApplicationMixin(Base) {
|
||||||
if (type === 'action') {
|
if (type === 'action') {
|
||||||
const { type: actionType } =
|
const { type: actionType } =
|
||||||
(await foundry.applications.api.DialogV2.input({
|
(await foundry.applications.api.DialogV2.input({
|
||||||
window: { title: 'Select Action Type' },
|
window: { title: game.i18n.localize('DAGGERHEART.CONFIG.SelectAction.selectType') },
|
||||||
content: await foundry.applications.handlebars.renderTemplate(
|
content: await foundry.applications.handlebars.renderTemplate(
|
||||||
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
'systems/daggerheart/templates/actionTypes/actionType.hbs',
|
||||||
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
{ types: CONFIG.DH.ACTIONS.actionTypes }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue