Merged with main

This commit is contained in:
WBHarry 2025-11-25 13:19:18 +01:00
parent 4510deae96
commit 01dd5ced94
10 changed files with 165 additions and 5 deletions

View file

@ -14,7 +14,6 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
constructor(options = {}) {
super(options);
this.sidebarCollapsed = true;
this.setupHooks();
}
@ -61,6 +60,8 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
async _renderFrame(options) {
const frame = await super._renderFrame(options);
frame.classList.add('effects-present');
const iconOnly =
game.user.getFlag(CONFIG.DH.id, CONFIG.DH.FLAGS.userFlags.countdownMode) ===
CONFIG.DH.GENERAL.countdownAppMode.iconOnly;
@ -98,11 +99,10 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
async _prepareContext(options) {
const context = await super._prepareContext(options);
context.isGM = game.user.isGM;
context.sidebarCollapsed = this.sidebarCollapsed;
context.iconOnly =
game.user.getFlag(CONFIG.DH.id, CONFIG.DH.FLAGS.userFlags.countdownMode) ===
CONFIG.DH.GENERAL.countdownAppMode.iconOnly;
const setting = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Countdowns);
context.countdowns = this.#getCountdowns().reduce((acc, { key, countdown, ownership }) => {
const playersWithAccess = game.users.reduce((acc, user) => {