refactor: extract inline HTML to templates, split oversized files, fix bugs
- Extract all inline HTML from JS into 21 Handlebars templates (chat/, dialogs/, ui/) - Split utils.mjs (1507) into barrel + helpers.mjs, combat.mjs, d30.mjs - Split roll.mjs (1632) into barrel + roll-base.mjs, roll-prompt.mjs, roll-combat.mjs, roll-damage.mjs - Split lethal-fantasy.mjs (1426) into bootstrap + chat-reaction.mjs - Fix: missing async on injectDiceTray (free-roll.mjs:29 SyntaxError) - Fix: weapon._id fallback for deserialized chat-message weapon objects - Fix: missing await on rollModifier.evaluate() calls in roll-combat.mjs - Fix: choices→choicesList ReferenceError in utils.mjs - Fix: add 12 missing i18n keys (chooseWeapon, chooseSave, attackRoll, etc.) - Fix: restore sideLabel in bonus-die-select.hbs - Clean: remove dead messageContent param, console.log→log() - Style: barrel files preserve existing import paths
This commit is contained in:
@@ -225,7 +225,7 @@ export default class LethalFantasyActor extends Actor {
|
||||
damageTier = await foundry.applications.api.DialogV2.wait({
|
||||
window: { title: "Choose spell tier" },
|
||||
classes: ["lethalfantasy"],
|
||||
content: `<p>Select the power level for <strong>${rollTarget.name}</strong>:</p>`,
|
||||
content: await foundry.applications.handlebars.renderTemplate("systems/fvtt-lethal-fantasy/templates/dialogs/power-level.hbs", {itemName: rollTarget.name}),
|
||||
buttons,
|
||||
rejectClose: false,
|
||||
}) || "standard"
|
||||
|
||||
Reference in New Issue
Block a user