diff --git a/module/applications/ui/countdowns.mjs b/module/applications/ui/countdowns.mjs index 4381012a..bfb68153 100644 --- a/module/applications/ui/countdowns.mjs +++ b/module/applications/ui/countdowns.mjs @@ -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; } diff --git a/styles/less/ui/countdown/countdown.less b/styles/less/ui/countdown/countdown.less index 47f06eb7..56381a44 100644 --- a/styles/less/ui/countdown/countdown.less +++ b/styles/less/ui/countdown/countdown.less @@ -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); + } +} } diff --git a/templates/ui/countdowns.hbs b/templates/ui/countdowns.hbs index 18694e49..73cd644f 100644 --- a/templates/ui/countdowns.hbs +++ b/templates/ui/countdowns.hbs @@ -38,5 +38,11 @@ {{/each}} + {{#if hasHiddenLongTerm}} +