Actor sheet -> working !!!, not WIP for rolls

This commit is contained in:
2026-06-06 16:25:00 +02:00
parent 891769816a
commit 2143bcc8db
3 changed files with 7 additions and 2 deletions
@@ -131,7 +131,12 @@ export class VermineBaseActorSheet extends HandlebarsApplicationMixin(foundry.ap
// ── Actions ───────────────────────────────────────────────────────── // ── Actions ─────────────────────────────────────────────────────────
_onRender(context, options) { _onRender(context, options) {
super._onRender(context, options) // Activate initial tabs (force to bypass changeTab's early-return when the
// tab is already set as active in tabGroups — Foundry v12 doesn't call
// changeTab on initial render, so the active class is never applied)
for (const [group, tab] of Object.entries(this.tabGroups ?? {})) {
this.changeTab(tab, group, {force: true})
}
this.#dragDrop.forEach(d => d.bind(this.element)) this.#dragDrop.forEach(d => d.bind(this.element))
this.element.querySelectorAll(".rollable").forEach(el => { this.element.querySelectorAll(".rollable").forEach(el => {
el.addEventListener("click", this._onRoll.bind(this)) el.addEventListener("click", this._onRoll.bind(this))
@@ -12,7 +12,6 @@ export class VermineCharacterSheetV2 extends VermineBaseActorSheet {
} }
static PARTS = { static PARTS = {
header: { template: "systems/vermine2047/templates/actor/appv2/character-header.hbs" },
main: { template: "systems/vermine2047/templates/actor/appv2/character-main.hbs" }, main: { template: "systems/vermine2047/templates/actor/appv2/character-main.hbs" },
tabs: { template: "templates/generic/tab-navigation.hbs" }, tabs: { template: "templates/generic/tab-navigation.hbs" },
abilities: { template: "systems/vermine2047/templates/actor/appv2/character-abilities.hbs" }, abilities: { template: "systems/vermine2047/templates/actor/appv2/character-abilities.hbs" },
+1
View File
@@ -1,4 +1,5 @@
<div class="tab main sheet-part" data-group="sheet" data-tab="main"> <div class="tab main sheet-part" data-group="sheet" data-tab="main">
{{> "systems/vermine2047/templates/actor/appv2/character-header.hbs"}}
{{!-- Toggle Edit/Play --}} {{!-- Toggle Edit/Play --}}
<div class="sheet-header-toggle"> <div class="sheet-header-toggle">
{{#if isEditMode}} {{#if isEditMode}}