Migration datamodels !
This commit is contained in:
33
modules/applications/sheets/wasteland-protection-sheet.mjs
Normal file
33
modules/applications/sheets/wasteland-protection-sheet.mjs
Normal file
@@ -0,0 +1,33 @@
|
||||
import WastelandItemSheet from "./base-item-sheet.mjs"
|
||||
|
||||
export default class WastelandProtectionSheet extends WastelandItemSheet {
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["protection"],
|
||||
position: { width: 620 },
|
||||
window: { contentClasses: ["protection-content"] },
|
||||
}
|
||||
|
||||
static PARTS = {
|
||||
main: { template: "systems/fvtt-wasteland/templates/item-protection-sheet.hbs" },
|
||||
}
|
||||
|
||||
tabGroups = { primary: "details" }
|
||||
|
||||
#getTabs() {
|
||||
const tabs = {
|
||||
details: { id: "details", group: "primary", label: "Détails" },
|
||||
description: { id: "description", group: "primary", label: "Description" }
|
||||
}
|
||||
for (const v of Object.values(tabs)) {
|
||||
v.active = this.tabGroups[v.group] === v.id
|
||||
v.cssClass = v.active ? "active" : ""
|
||||
}
|
||||
return tabs
|
||||
}
|
||||
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.tabs = this.#getTabs()
|
||||
return context
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user