From f5c7e1c4bc5c5c538bb592bdd5521ee466f0d5a7 Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 23 Mar 2026 00:23:32 -0600 Subject: [PATCH] Add the toggle for item equipped status and inventory properties --- langs/en-ca.json | 7 +++++++ styles/Apps/PlayerSheet.css | 15 ++++++++++----- styles/themes/dark.css | 5 +++-- templates/PlayerSheet/item-lists.hbs | 13 +++++++++++-- templates/PlayerSheet/item.hbs | 6 ++++++ 5 files changed, 37 insertions(+), 9 deletions(-) diff --git a/langs/en-ca.json b/langs/en-ca.json index 4610f0a..7b7a326 100644 --- a/langs/en-ca.json +++ b/langs/en-ca.json @@ -84,6 +84,13 @@ "manage-attributes": "Manage Attributes", "current-value": "Current value", "max-value": "Maximum value", + "carry-capacity-used": "({percent}% Used)", + "carrying-capacity": { + "title": "Carrying Capacity:", + "label": "Maximum carrying weight" + }, + "total-weight": "Total weight", + "toggle-item-description": "Show/Hide Item Description", "tab-names": { "content": "Content", "items": "Items" diff --git a/styles/Apps/PlayerSheet.css b/styles/Apps/PlayerSheet.css index 3981a99..f6a9024 100644 --- a/styles/Apps/PlayerSheet.css +++ b/styles/Apps/PlayerSheet.css @@ -37,7 +37,7 @@ } } - .items-tab { + .items-tab.active { display: flex; flex-direction: column; gap: 8px; @@ -49,7 +49,7 @@ gap: 4px; align-items: center; background: var(--inventory-summary-background); - color: var(--inventory-summary-color); + color: var(--inventory-summary-colour); padding: 6px; border-radius: 4px; @@ -57,8 +57,13 @@ width: 75px; text-align: center; background: var(--inventory-input-background); - color: var(--inventory-input-color); + color: var(--inventory-input-colour); text-align: center; + + &:disabled { + color: var(--inventory-input-disabled-colour); + cursor: not-allowed; + } } } @@ -90,7 +95,7 @@ .summary { display: grid; - grid-template-columns: auto 1fr 50px auto; + grid-template-columns: min-content auto 1fr 50px auto; align-items: center; gap: 8px; background: var(--item-card-header-background); @@ -120,7 +125,7 @@ input, button { background: var(--item-card-header-input-background); - color: var(--item-card-header-input-color); + color: var(--item-card-header-input-colour); text-align: center; } } diff --git a/styles/themes/dark.css b/styles/themes/dark.css index 9fd289b..ddd01e9 100644 --- a/styles/themes/dark.css +++ b/styles/themes/dark.css @@ -12,9 +12,10 @@ --tab-button-hover-bg: var(--color-cool-3); --inventory-summary-background: #171e26; - --inventory-summary-color: white; + --inventory-summary-colour: white; --inventory-input-background: #2b3642; - --inventory-input-color: white; + --inventory-input-colour: white; + --inventory-input-disabled-colour: gray; --item-list-header-background: #171e26; --item-list-header-color: white; diff --git a/templates/PlayerSheet/item-lists.hbs b/templates/PlayerSheet/item-lists.hbs index 028bbe8..bd1bc30 100644 --- a/templates/PlayerSheet/item-lists.hbs +++ b/templates/PlayerSheet/item-lists.hbs @@ -5,15 +5,21 @@ >

- Carrying Capacity: + {{localize "taf.Apps.PlayerSheet.carrying-capacity.title"}}

- ({{carryCapacityPercent}}% Used) + {{localize + "taf.Apps.PlayerSheet.carry-capacity-used" + percent=carryCapacityPercent + }}
{{#each itemGroups as | group |}} diff --git a/templates/PlayerSheet/item.hbs b/templates/PlayerSheet/item.hbs index 36d7bf2..ce58813 100644 --- a/templates/PlayerSheet/item.hbs +++ b/templates/PlayerSheet/item.hbs @@ -3,6 +3,11 @@ data-item-uuid="{{uuid}}" >
+