From aca1f8a5418805494a0f93881586b48834fe424c Mon Sep 17 00:00:00 2001 From: WBHarry Date: Fri, 6 Jun 2025 03:14:17 +0200 Subject: [PATCH] Removed tabs when in Summary --- lang/en.json | 1 + module/applications/levelup.mjs | 1 + styles/daggerheart.css | 5 ++- styles/levelup.less | 1 + .../views/levelup/tabs/tab-navigation.hbs | 42 ++++++++++--------- 5 files changed, 28 insertions(+), 22 deletions(-) diff --git a/lang/en.json b/lang/en.json index a77dda56..e5d9f478 100755 --- a/lang/en.json +++ b/lang/en.json @@ -765,6 +765,7 @@ "summary": "Summary" }, "navigateLevel": "To Level {level}", + "navigateToLevelup": "Return To Levelup", "navigateToSummary": "To Summary", "TakeLevelUp": "Finish Level Up", "Delevel": { diff --git a/module/applications/levelup.mjs b/module/applications/levelup.mjs index 2cd1b0a9..29379c7a 100644 --- a/module/applications/levelup.mjs +++ b/module/applications/levelup.mjs @@ -115,6 +115,7 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2) const { selections } = currentLevel.nrSelections; context.tabs.advancements.progress = { selected: selections, max: currentLevel.maxSelections }; + context.showTabs = this.tabGroups.primary !== 'summary'; break; case 'selections': const advancementChoices = Object.keys(currentLevel.choices).reduce((acc, choiceKey) => { diff --git a/styles/daggerheart.css b/styles/daggerheart.css index d84442b8..0f398e0d 100755 --- a/styles/daggerheart.css +++ b/styles/daggerheart.css @@ -2739,6 +2739,7 @@ div.daggerheart.views.multiclass { display: flex; align-items: center; gap: 22px; + height: 36px; } .daggerheart.levelup .levelup-navigation-container nav { flex: 1; @@ -2934,7 +2935,7 @@ div.daggerheart.views.multiclass { --primary-color-fear: rgba(9, 71, 179, 0.75); --secondary-color-fear: rgba(9, 71, 179, 0.75); --shadow-text-stroke: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; - --fear-animation: background 0.3s ease, box-shadow .3s ease, border-color .3s ease, opacity .3s ease; + --fear-animation: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.3s ease; } #resources { min-height: calc(var(--header-height) + 4rem); @@ -3030,7 +3031,7 @@ div.daggerheart.views.multiclass { #resources .window-content #resource-fear.isGM i:hover { font-size: var(--font-size-20); } -#resources button[data-action="close"] { +#resources button[data-action='close'] { display: none; } #resources:not(:hover):not(.minimized) { diff --git a/styles/levelup.less b/styles/levelup.less index 39b2aeb1..51f8423b 100644 --- a/styles/levelup.less +++ b/styles/levelup.less @@ -32,6 +32,7 @@ display: flex; align-items: center; gap: 22px; + height: 36px; nav { flex: 1; diff --git a/templates/views/levelup/tabs/tab-navigation.hbs b/templates/views/levelup/tabs/tab-navigation.hbs index 1acfc958..3552825b 100644 --- a/templates/views/levelup/tabs/tab-navigation.hbs +++ b/templates/views/levelup/tabs/tab-navigation.hbs @@ -1,27 +1,29 @@
- -
- {{#if (not this.navigate.previous.disabled)}} - {{#if this.navigate.previous.fromSummary}} - - {{else}} - + {{#if this.showTabs}} + + {{/if}} +
+ {{#if this.navigate.previous.fromSummary}} + + {{else}} + {{#if (not this.navigate.previous.disabled)}} + + {{/if}} {{/if}} {{#if this.navigate.next.show}} {{#if this.navigate.next.toSummary}}