From c571e6a209b0f4238084ef99fdf12bc92289aaec Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Sat, 6 Jun 2026 18:32:03 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Correction=20des=20exports/imports=20APP?= =?UTF-8?q?V2=20et=20cl=C3=A9s=20i18N=20manquantes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Standardisation des exports de sheets sur 'export default class' (sauf base-item-sheet) - Correction des imports pour utiliser des imports par défaut - Correction de _module.mjs pour exporter les classes correctement - Suppression des redéfinitions de changeTab dans group-sheet et npc-sheet - Ajout des clés i18N manquantes: VERMINE.reserve, VERMINE.Sheet.* - Correction de l'export de VermineBaseItemSheet (export nommé) Corrige l'erreur 'Receiver must be class VermineGroupSheetV2' et aligne sur fvtt-hamalron et fvtt-celestopol Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- lang/fr.json | 9 ++++++++- module/applications/sheets/_module.mjs | 10 +++++----- module/applications/sheets/base-actor-sheet.mjs | 2 +- module/applications/sheets/base-item-sheet.mjs | 1 + module/applications/sheets/character-sheet.mjs | 4 ++-- module/applications/sheets/creature-sheet.mjs | 4 ++-- module/applications/sheets/group-sheet.mjs | 12 ++---------- module/applications/sheets/npc-sheet.mjs | 12 ++---------- 8 files changed, 23 insertions(+), 31 deletions(-) diff --git a/lang/fr.json b/lang/fr.json index a3f403f..e88258b 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -282,6 +282,7 @@ "group_members": "Membres", "encounters": "Rencontres", "road": "La Route", + "reserve": "Réserve", "totem_picker": "Sélecteur de totem", "actor_picker": "Sélecteur de personnage", "morale": "Moral", @@ -316,7 +317,13 @@ }, "RollTool": "Outil de lancer de dés", "roll": "Lancer", - "cancel": "Annuler" + "cancel": "Annuler", + "Sheet": { + "character": "Personnage", + "npc": "PNJ", + "group": "Groupe", + "creature": "Créature" + } }, "UI": { "add": "Ajouter", diff --git a/module/applications/sheets/_module.mjs b/module/applications/sheets/_module.mjs index f311583..bd1eb28 100644 --- a/module/applications/sheets/_module.mjs +++ b/module/applications/sheets/_module.mjs @@ -1,9 +1,9 @@ -export { VermineBaseActorSheet } from "./base-actor-sheet.mjs" +export { default as VermineBaseActorSheet } from "./base-actor-sheet.mjs" export { VermineBaseItemSheet } from "./base-item-sheet.mjs" -export { VermineCharacterSheetV2 } from "./character-sheet.mjs" -export { VermineNpcSheetV2 } from "./npc-sheet.mjs" -export { VermineGroupSheetV2 } from "./group-sheet.mjs" -export { VermineCreatureSheetV2 } from "./creature-sheet.mjs" +export { default as VermineCharacterSheetV2 } from "./character-sheet.mjs" +export { default as VermineNpcSheetV2 } from "./npc-sheet.mjs" +export { default as VermineGroupSheetV2 } from "./group-sheet.mjs" +export { default as VermineCreatureSheetV2 } from "./creature-sheet.mjs" export { VermineItemSheetV2, VermineWeaponSheetV2, diff --git a/module/applications/sheets/base-actor-sheet.mjs b/module/applications/sheets/base-actor-sheet.mjs index a2b2863..651e4ba 100644 --- a/module/applications/sheets/base-actor-sheet.mjs +++ b/module/applications/sheets/base-actor-sheet.mjs @@ -6,7 +6,7 @@ const { HandlebarsApplicationMixin } = foundry.applications.api * Fiche de base pour tous les acteurs Vermine 2047 (ApplicationV2). * Remplace VermineActorSheet (AppV1). */ -export class VermineBaseActorSheet extends HandlebarsApplicationMixin(foundry.applications.sheets.ActorSheetV2) { +export default class VermineBaseActorSheet extends HandlebarsApplicationMixin(foundry.applications.sheets.ActorSheetV2) { // ── Mode édition / jeu ────────────────────────────────────────────── diff --git a/module/applications/sheets/base-item-sheet.mjs b/module/applications/sheets/base-item-sheet.mjs index 0d883d9..1cc1bd6 100644 --- a/module/applications/sheets/base-item-sheet.mjs +++ b/module/applications/sheets/base-item-sheet.mjs @@ -66,6 +66,7 @@ export class VermineBaseItemSheet extends HandlebarsApplicationMixin(foundry.app system: this.document.system, source: this.document.toObject(), config: CONFIG.VERMINE, + enrichedDescription: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true }), isEditMode: this.isEditMode, isPlayMode: this.isPlayMode, isEditable: this.isEditable diff --git a/module/applications/sheets/character-sheet.mjs b/module/applications/sheets/character-sheet.mjs index b24bee6..03d6239 100644 --- a/module/applications/sheets/character-sheet.mjs +++ b/module/applications/sheets/character-sheet.mjs @@ -1,6 +1,6 @@ -import { VermineBaseActorSheet } from "./base-actor-sheet.mjs" +import VermineBaseActorSheet from "./base-actor-sheet.mjs" -export class VermineCharacterSheetV2 extends VermineBaseActorSheet { +export default class VermineCharacterSheetV2 extends VermineBaseActorSheet { static DEFAULT_OPTIONS = { classes: ["character"], diff --git a/module/applications/sheets/creature-sheet.mjs b/module/applications/sheets/creature-sheet.mjs index ce27a30..41eadcc 100644 --- a/module/applications/sheets/creature-sheet.mjs +++ b/module/applications/sheets/creature-sheet.mjs @@ -1,6 +1,6 @@ -import { VermineBaseActorSheet } from "./base-actor-sheet.mjs" +import VermineBaseActorSheet from "./base-actor-sheet.mjs" -export class VermineCreatureSheetV2 extends VermineBaseActorSheet { +export default class VermineCreatureSheetV2 extends VermineBaseActorSheet { static DEFAULT_OPTIONS = { classes: ["creature"], diff --git a/module/applications/sheets/group-sheet.mjs b/module/applications/sheets/group-sheet.mjs index a570f54..9dade71 100644 --- a/module/applications/sheets/group-sheet.mjs +++ b/module/applications/sheets/group-sheet.mjs @@ -1,6 +1,6 @@ -import { VermineBaseActorSheet } from "./base-actor-sheet.mjs" +import VermineBaseActorSheet from "./base-actor-sheet.mjs" -export class VermineGroupSheetV2 extends VermineBaseActorSheet { +export default class VermineGroupSheetV2 extends VermineBaseActorSheet { static DEFAULT_OPTIONS = { classes: ["group"], @@ -61,14 +61,6 @@ export class VermineGroupSheetV2 extends VermineBaseActorSheet { return context } - changeTab(tab, group, options = {}) { - super.changeTab(tab, group, options) - if (group === "sheet") { - const main = this.element?.querySelector('[data-group="sheet"][data-tab="main"]') - if (main) main.classList.add("active") - } - } - async _preparePartContext(partId, context) { const doc = this.document switch (partId) { diff --git a/module/applications/sheets/npc-sheet.mjs b/module/applications/sheets/npc-sheet.mjs index b951d5b..8f8b0c6 100644 --- a/module/applications/sheets/npc-sheet.mjs +++ b/module/applications/sheets/npc-sheet.mjs @@ -1,6 +1,6 @@ -import { VermineBaseActorSheet } from "./base-actor-sheet.mjs" +import VermineBaseActorSheet from "./base-actor-sheet.mjs" -export class VermineNpcSheetV2 extends VermineBaseActorSheet { +export default class VermineNpcSheetV2 extends VermineBaseActorSheet { static DEFAULT_OPTIONS = { classes: ["npc"], @@ -41,14 +41,6 @@ export class VermineNpcSheetV2 extends VermineBaseActorSheet { return context } - changeTab(tab, group, options = {}) { - super.changeTab(tab, group, options) - if (group === "sheet") { - const main = this.element?.querySelector('[data-group="sheet"][data-tab="main"]') - if (main) main.classList.add("active") - } - } - async _preparePartContext(partId, context) { const doc = this.document switch (partId) {