RC-25 | Initialize the Hero Summary Sheet application
This commit is contained in:
parent
2fc3b86792
commit
b10535eceb
7 changed files with 155 additions and 1 deletions
53
module/Apps/ActorSheets/HeroSummaryCardV1.mjs
Normal file
53
module/Apps/ActorSheets/HeroSummaryCardV1.mjs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import { filePath } from "../../consts.mjs";
|
||||
|
||||
const { DocumentSheetV2, HandlebarsApplicationMixin } = foundry.applications.api;
|
||||
|
||||
export class HeroSummaryCardV1 extends HandlebarsApplicationMixin(DocumentSheetV2) {
|
||||
|
||||
// #region Options
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: [
|
||||
`ripcrypt`,
|
||||
`ripcrypt--actor`,
|
||||
`ripcrypt--HeroSummaryCardV1`,
|
||||
`ripcrypt-theme--dark`,
|
||||
],
|
||||
position: {
|
||||
width: `auto`,
|
||||
height: `auto`,
|
||||
},
|
||||
window: {
|
||||
resizable: false,
|
||||
},
|
||||
actions: {},
|
||||
form: {
|
||||
submitOnChange: true,
|
||||
closeOnSubmit: false,
|
||||
},
|
||||
};
|
||||
|
||||
static PARTS = {
|
||||
content: {
|
||||
template: filePath(`Apps/HeroSummaryCardV1/content.hbs`),
|
||||
},
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region Lifecycle
|
||||
async _preparePartContext(partId, ctx, opts) {
|
||||
ctx = await super._preparePartContext(partId, ctx, opts);
|
||||
|
||||
ctx.meta ??= {};
|
||||
ctx.meta.idp = this.document.uuid;
|
||||
|
||||
partId = partId.slice(0,1).toUpperCase() + partId.slice(1);
|
||||
if (this[`_prepare${partId}Context`] != null) {
|
||||
ctx = await this[`_prepare${partId}Context`](ctx, opts);
|
||||
};
|
||||
return ctx;
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region Actions
|
||||
// #endregion
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue