mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
add indication of long term countdowns
This commit is contained in:
parent
5b0b1023f6
commit
a02ca40f87
3 changed files with 30 additions and 2 deletions
|
|
@ -92,8 +92,7 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
|
|||
ownership: DhCountdowns.#getPlayerOwnership(game.user, setting, countdown)
|
||||
}));
|
||||
return values.filter(v =>
|
||||
v.ownership !== CONST.DOCUMENT_OWNERSHIP_LEVELS.NONE &&
|
||||
this.#shouldShowCountdown(v.countdown)
|
||||
v.ownership !== CONST.DOCUMENT_OWNERSHIP_LEVELS.NONE
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -156,6 +155,13 @@ export default class DhCountdowns extends HandlebarsApplicationMixin(Application
|
|||
acc[key]=countdown;
|
||||
return acc;
|
||||
}, {});
|
||||
context.hasHiddenLongTerm = !this._isFocused && allCountdowns.some(
|
||||
({countdown}) => countdown.type === CONFIG.DH.GENERAL.countdownBaseTypes.longterm.id
|
||||
);
|
||||
console.log('Debug - isFocused:', this._isFocused);
|
||||
console.log('Debug - hasHiddenLongTerm:', context.hasHiddenLongTerm);
|
||||
console.log('Debug - allCountdowns:', allCountdowns);
|
||||
console.log('Debug - longterm countdowns:', allCountdowns.filter(({countdown}) => countdown.type === CONFIG.DH.GENERAL.countdownBaseTypes.longterm.id));
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,4 +153,20 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.longterm-indicator {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 8px;
|
||||
margin-top: 8px;
|
||||
border-top: 1px solid light-dark(@dark-blue-40, @beige-40);
|
||||
font-size: var(--font-size-12);
|
||||
color: light-dark(@dark-80, @beige-80);
|
||||
cursor: default;
|
||||
|
||||
i {
|
||||
font-size: var(--font-size-10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,5 +38,11 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#if hasHiddenLongTerm}}
|
||||
<div class="longterm-indicator">
|
||||
<i class="fa-solid fa-chevron-down"></i>
|
||||
<span>Long Term Countdowns</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue