mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 20:51:07 +01:00
Added stumps for all limited actor views
This commit is contained in:
parent
990c73987e
commit
cc3ebca075
11 changed files with 123 additions and 12 deletions
|
|
@ -78,6 +78,11 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
|
||||
/**@override */
|
||||
static PARTS = {
|
||||
limited: {
|
||||
id: 'limited',
|
||||
scrollable: ['.limited-container'],
|
||||
template: 'systems/daggerheart/templates/sheets/actors/character/limited.hbs'
|
||||
},
|
||||
sidebar: {
|
||||
id: 'sidebar',
|
||||
scrollable: ['.shortcut-items-section'],
|
||||
|
|
@ -146,19 +151,21 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
async _onRender(context, options) {
|
||||
await super._onRender(context, options);
|
||||
|
||||
this.element
|
||||
.querySelector('.level-value')
|
||||
?.addEventListener('change', event => this.document.updateLevel(Number(event.currentTarget.value)));
|
||||
if (!this.document.testUserPermission(game.user, 'LIMITED', { exact: true })) {
|
||||
this.element
|
||||
.querySelector('.level-value')
|
||||
?.addEventListener('change', event => this.document.updateLevel(Number(event.currentTarget.value)));
|
||||
|
||||
const observer = this.document.testUserPermission(game.user, CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER, {
|
||||
exact: true
|
||||
});
|
||||
if (observer) {
|
||||
this.element.querySelector('.window-content').classList.add('viewMode');
|
||||
const observer = this.document.testUserPermission(game.user, CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER, {
|
||||
exact: true
|
||||
});
|
||||
if (observer) {
|
||||
this.element.querySelector('.window-content').classList.add('viewMode');
|
||||
}
|
||||
|
||||
this._createFilterMenus();
|
||||
this._createSearchFilter();
|
||||
}
|
||||
|
||||
this._createFilterMenus();
|
||||
this._createSearchFilter();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue