Rework des fiches creature/PJ et Tinji/Loksyu
This commit is contained in:
@@ -22,7 +22,7 @@ export class CDEBaseActorSheet extends HandlebarsApplicationMixin(foundry.applic
|
||||
}
|
||||
|
||||
async _prepareContext() {
|
||||
const descriptionHTML = await TextEditor.enrichHTML(this.document.system.description ?? "", { async: true })
|
||||
const descriptionHTML = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description ?? "", { async: true })
|
||||
const cssClass = this.options.classes?.join(" ") ?? ""
|
||||
return {
|
||||
actor: this.document,
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
export { CDECharacterSheet } from "./character.js"
|
||||
export { CDENpcSheet } from "./npc.js"
|
||||
export { CDETinjiSheet } from "./tinji.js"
|
||||
export { CDELoksyuSheet } from "./loksyu.js"
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import { CDEBaseActorSheet } from "./base.js"
|
||||
import { CDELoksyuApp } from "../../apps/loksyu-app.js"
|
||||
|
||||
export class CDELoksyuSheet extends CDEBaseActorSheet {
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["loksyu"],
|
||||
}
|
||||
|
||||
static PARTS = {
|
||||
main: { template: "systems/fvtt-chroniques-de-l-etrange/templates/actor/cde-loksyu-sheet.html" },
|
||||
}
|
||||
|
||||
tabGroups = { primary: "loksyu" }
|
||||
|
||||
/** Redirect any direct actor-sheet open to the standalone app instead */
|
||||
async _onFirstRender(context, options) {
|
||||
// Close this actor sheet immediately and open the standalone app
|
||||
await this.close({ animate: false })
|
||||
CDELoksyuApp.open()
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
import { CDEBaseActorSheet } from "./base.js"
|
||||
import { CDETinjiApp } from "../../apps/tinji-app.js"
|
||||
|
||||
export class CDETinjiSheet extends CDEBaseActorSheet {
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["tinji"],
|
||||
}
|
||||
|
||||
static PARTS = {
|
||||
main: { template: "systems/fvtt-chroniques-de-l-etrange/templates/actor/cde-tinji-sheet.html" },
|
||||
}
|
||||
|
||||
tabGroups = { primary: "tinji" }
|
||||
|
||||
/** Redirect any direct actor-sheet open to the standalone app instead */
|
||||
async _onFirstRender(context, options) {
|
||||
await this.close({ animate: false })
|
||||
CDETinjiApp.open()
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,8 @@ export class CDEBaseItemSheet extends HandlebarsApplicationMixin(foundry.applica
|
||||
|
||||
async _prepareContext() {
|
||||
const cssClass = this.options.classes?.join(" ") ?? ""
|
||||
const enrichedDescription = await TextEditor.enrichHTML(this.document.system.description ?? "", { async: true })
|
||||
const enrichedNotes = await TextEditor.enrichHTML(this.document.system.notes ?? "", { async: true })
|
||||
const enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description ?? "", { async: true })
|
||||
const enrichedNotes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.notes ?? "", { async: true })
|
||||
return {
|
||||
item: this.document,
|
||||
system: this.document.system,
|
||||
|
||||
Reference in New Issue
Block a user