mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Adding Prettier
* Added prettier with automatic useage on pre-commit to avoid style breakage * Ran Prettier on the project
This commit is contained in:
parent
820c2df1f4
commit
b24cdcc9ed
136 changed files with 13929 additions and 12206 deletions
|
|
@ -1,22 +1,22 @@
|
|||
export default function DhpApplicationMixin(Base) {
|
||||
return class DhpSheet extends Base {
|
||||
static applicationType = "sheets";
|
||||
static documentType = "";
|
||||
static applicationType = 'sheets';
|
||||
static documentType = '';
|
||||
|
||||
static get defaultOptions() {
|
||||
return Object.assign(super.defaultOptions, {
|
||||
classes: ["daggerheart", "sheet", this.documentType],
|
||||
classes: ['daggerheart', 'sheet', this.documentType],
|
||||
template: `systems/${SYSTEM.id}/templates/${this.applicationType}/${this.documentType}.hbs`,
|
||||
height: "auto",
|
||||
height: 'auto',
|
||||
submitOnChange: true,
|
||||
submitOnClose: false,
|
||||
width: 450
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/** @override */
|
||||
get title() {
|
||||
const {documentName, type, name} = this.object;
|
||||
const { documentName, type, name } = this.object;
|
||||
// const typeLabel = game.i18n.localize(CONFIG[documentName].typeLabels[type]);
|
||||
const typeLabel = documentName;
|
||||
return `[${typeLabel}] ${name}`;
|
||||
|
|
@ -32,17 +32,17 @@ export default function DhpApplicationMixin(Base) {
|
|||
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
html.on("click", "[data-action]", this.#onClickAction.bind(this));
|
||||
html.on('click', '[data-action]', this.#onClickAction.bind(this));
|
||||
}
|
||||
|
||||
async #onClickAction(event) {
|
||||
event.preventDefault();
|
||||
const button = event.currentTarget;
|
||||
const action = button.dataset.action;
|
||||
|
||||
return this._handleAction(action, event, button);
|
||||
event.preventDefault();
|
||||
const button = event.currentTarget;
|
||||
const action = button.dataset.action;
|
||||
|
||||
return this._handleAction(action, event, button);
|
||||
}
|
||||
|
||||
async _handleAction(action, event, button) {}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue