mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
* Added prettier with automatic useage on pre-commit to avoid style breakage * Ran Prettier on the project
57 lines
1.6 KiB
JavaScript
57 lines
1.6 KiB
JavaScript
// import DhpApplicationMixin from '../daggerheart-sheet.mjs';
|
|
|
|
// export default class MiscellaneousSheet extends DhpApplicationMixin(ItemSheet) {
|
|
// static documentType = "miscellaneous";
|
|
|
|
// /** @override */
|
|
// static get defaultOptions() {
|
|
// return foundry.utils.mergeObject(super.defaultOptions, {
|
|
// classes: ["daggerheart", "sheet", "miscellaneous"],
|
|
// width: 400,
|
|
// height: 'auto',
|
|
// });
|
|
// }
|
|
|
|
// /** @override */
|
|
// getData() {
|
|
// const context = super.getData();
|
|
|
|
// return context;
|
|
// }
|
|
// }
|
|
|
|
import DaggerheartSheet from './daggerheart-sheet.mjs';
|
|
|
|
const { ItemSheetV2 } = foundry.applications.sheets;
|
|
export default class MiscellaneousSheet extends DaggerheartSheet(ItemSheetV2) {
|
|
static DEFAULT_OPTIONS = {
|
|
tag: 'form',
|
|
id: 'daggerheart-miscellaneous',
|
|
classes: ['daggerheart', 'sheet', 'miscellaneous'],
|
|
position: { width: 400 },
|
|
form: {
|
|
handler: this.updateForm,
|
|
submitOnChange: true,
|
|
closeOnSubmit: false
|
|
}
|
|
};
|
|
|
|
static PARTS = {
|
|
form: {
|
|
id: 'feature',
|
|
template: 'systems/daggerheart/templates/sheets/miscellaneous.hbs'
|
|
}
|
|
};
|
|
|
|
async _prepareContext(_options) {
|
|
const context = await super._prepareContext(_options);
|
|
context.document = this.document;
|
|
|
|
return context;
|
|
}
|
|
|
|
static async updateForm(event, _, formData) {
|
|
await this.document.update(formData.object);
|
|
this.render();
|
|
}
|
|
}
|