RC-76 | Crypt Application Setup
This commit is contained in:
parent
98eb389a13
commit
9e12737429
3 changed files with 50 additions and 0 deletions
43
module/Apps/CryptApp.mjs
Normal file
43
module/Apps/CryptApp.mjs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import { filePath } from "../consts.mjs";
|
||||
import { GenericAppMixin } from "./GenericApp.mjs";
|
||||
import { Logger } from "../utils/Logger.mjs";
|
||||
|
||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||
|
||||
export class CryptApp extends GenericAppMixin(HandlebarsApplicationMixin(ApplicationV2)) {
|
||||
// #region Options
|
||||
static DEFAULT_OPTIONS = {
|
||||
window: {
|
||||
title: `Crypt Overview`,
|
||||
frame: true,
|
||||
positioned: true,
|
||||
resizable: false,
|
||||
minimizable: true,
|
||||
},
|
||||
actions: {},
|
||||
};
|
||||
|
||||
static PARTS = {
|
||||
main: {
|
||||
template: filePath(`Apps/CryptApp/main.hbs`),
|
||||
},
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region Lifecycle
|
||||
async _renderFrame(options) {
|
||||
const frame = await super._renderFrame(options);
|
||||
this.window.close.remove(); // Prevent closing
|
||||
return frame;
|
||||
}
|
||||
|
||||
async _preparePartContext(partId, ctx, opts) {
|
||||
ctx = await super._preparePartContext(partId, ctx, opts);
|
||||
Logger.log(`Context`, ctx);
|
||||
return ctx;
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region Actions
|
||||
// #endregion
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue