Begin work on the updated item sheet and get the tabs initialized (Closes #141)

This commit is contained in:
Oliver-Akins 2024-03-30 22:02:39 -06:00
parent be31e98dea
commit df316c68f3
12 changed files with 131 additions and 3 deletions

View file

@ -31,6 +31,12 @@ export const partials = [
`actors/char-sheet/v2/partials/inventory/items/aspect.v2.pc.hbs`,
`actors/char-sheet/v2/partials/inventory/items/weapon.v2.pc.hbs`,
`actors/char-sheet/v2/partials/inventory/items/pet.v2.pc.hbs`,
// The v2 Untyped sheet partials
`items/untyped/v2/tabs/general.v2.untyped.hbs`,
`items/untyped/v2/tabs/details.v2.untyped.hbs`,
`items/untyped/v2/tabs/effects.v2.untyped.hbs`,
`items/untyped/v2/tabs/settings.v2.untyped.hbs`,
];
export const preAliasedPartials = {

View file

@ -5,17 +5,30 @@ export class UntypedItemSheet extends GenericItemSheet {
let opts = mergeObject(
super.defaultOptions,
{
template: `systems/dotdungeon/templates/items/custom.hbs`,
width: 280,
template: `systems/dotdungeon/templates/items/untyped/v2/index.hbs`,
width: 300,
height: 340,
tabs: [
{
group: `page`,
navSelector: `nav.page`,
contentSelector: `.page-content`,
initial: `general`,
},
],
}
);
opts.classes.push(`dotdungeon`);
opts.classes.push(`dotdungeon`, `style-v3`);
return opts;
};
async getData() {
const ctx = await super.getData();
ctx.computed = {
showSettingsTab: ctx.isGM || this.item.isOwned,
};
return ctx;
};
};