From 6fdd2318a5ecf15e6ceb67e7a0afe6f2c7c406bb Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 24 Aug 2025 15:04:26 +0200 Subject: [PATCH] Added hints for drag-drop areas --- lang/en.json | 2 ++ styles/less/global/global.less | 5 +++++ styles/less/global/index.less | 1 + .../less/sheets/actors/character/inventory.less | 4 ---- styles/less/sheets/actors/character/loadout.less | 4 ---- styles/less/ui/item-browser/item-browser.less | 8 ++------ templates/sheets/items/class/features.hbs | 3 +++ templates/sheets/items/class/settings.hbs | 15 +++++++++++++++ 8 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 styles/less/global/global.less diff --git a/lang/en.json b/lang/en.json index f310a01d..aee5a22f 100755 --- a/lang/en.json +++ b/lang/en.json @@ -1955,6 +1955,8 @@ "plural": "Miss" }, "maxWithThing": "Max {thing}", + "missingDragDropThing": "Drag in a {thing} to add it", + "missingDragDropThingAlt": "Drag in an {thing} to add it", "multiclass": "Multiclass", "newCategory": "New Category", "none": "None", diff --git a/styles/less/global/global.less b/styles/less/global/global.less new file mode 100644 index 00000000..d3c8230a --- /dev/null +++ b/styles/less/global/global.less @@ -0,0 +1,5 @@ +.hint { + flex: 0 0 100%; + margin: 0; + color: var(--color-form-hint); +} diff --git a/styles/less/global/index.less b/styles/less/global/index.less index 5f955ce3..db61304a 100644 --- a/styles/less/global/index.less +++ b/styles/less/global/index.less @@ -3,6 +3,7 @@ @import './chat.less'; @import './elements.less'; @import './enrichment.less'; +@import './global.less'; @import './tab-navigation.less'; @import './tab-form-footer.less'; @import './tab-actions.less'; diff --git a/styles/less/sheets/actors/character/inventory.less b/styles/less/sheets/actors/character/inventory.less index 48bdd682..d8c225ad 100644 --- a/styles/less/sheets/actors/character/inventory.less +++ b/styles/less/sheets/actors/character/inventory.less @@ -27,10 +27,6 @@ outline: 2px solid light-dark(@dark, @golden); } - &:placeholder { - color: light-dark(@dark-blue-50, @beige-50); - } - &::-webkit-search-cancel-button { -webkit-appearance: none; display: none; diff --git a/styles/less/sheets/actors/character/loadout.less b/styles/less/sheets/actors/character/loadout.less index 98fe9eed..24a53959 100644 --- a/styles/less/sheets/actors/character/loadout.less +++ b/styles/less/sheets/actors/character/loadout.less @@ -27,10 +27,6 @@ outline: 2px solid light-dark(@dark, @golden); } - &:placeholder { - color: light-dark(@dark-blue-50, @beige-50); - } - &::-webkit-search-cancel-button { -webkit-appearance: none; display: none; diff --git a/styles/less/ui/item-browser/item-browser.less b/styles/less/ui/item-browser/item-browser.less index 407a3116..7d708e1f 100644 --- a/styles/less/ui/item-browser/item-browser.less +++ b/styles/less/ui/item-browser/item-browser.less @@ -148,10 +148,6 @@ outline: 2px solid light-dark(@dark, @golden); } - &:placeholder { - color: light-dark(@dark-blue-50, @beige-50); - } - &::-webkit-search-cancel-button { -webkit-appearance: none; display: none; @@ -187,7 +183,7 @@ } &:has(+ .subfolder-list):after { - content: "+"; + content: '+'; } } @@ -357,7 +353,7 @@ grid-template-rows: 0fr; transition: all 0.3s ease-in-out; width: 100%; - + .wrapper { overflow: hidden; display: grid; diff --git a/templates/sheets/items/class/features.hbs b/templates/sheets/items/class/features.hbs index 4e6a7e6f..51037263 100644 --- a/templates/sheets/items/class/features.hbs +++ b/templates/sheets/items/class/features.hbs @@ -27,6 +27,9 @@
{{localize "TYPES.Item.subclass"}}
+ {{#unless source.system.subclasses}} +
{{localize "DAGGERHEART.GENERAL.missingDragDropThing" thing=(localize "TYPES.Item.subclass")}}
+ {{/unless}} {{#each source.system.subclasses as |subclass index|}}
  • diff --git a/templates/sheets/items/class/settings.hbs b/templates/sheets/items/class/settings.hbs index 9ac2b14f..4b8de09c 100644 --- a/templates/sheets/items/class/settings.hbs +++ b/templates/sheets/items/class/settings.hbs @@ -45,6 +45,8 @@ {{#unless (eq document.parent.type 'character')}}{{/unless}}
  • + {{else}} +
    {{localize "DAGGERHEART.GENERAL.missingDragDropThing" thing=(localize "TYPES.Item.weapon")}}
    {{/if}}
    @@ -60,6 +62,8 @@ {{#unless (eq document.parent.type 'character')}}{{/unless}} + {{else}} +
    {{localize "DAGGERHEART.GENERAL.missingDragDropThing" thing=(localize "TYPES.Item.weapon")}}
    {{/if}} @@ -75,6 +79,8 @@ {{#unless (eq document.parent.type 'character')}}{{/unless}} + {{else}} +
    {{localize "DAGGERHEART.GENERAL.missingDragDropThingAlt" thing=(localize "TYPES.Item.armor")}}
    {{/if}} @@ -85,6 +91,9 @@
    {{localize "DAGGERHEART.GENERAL.take"}}
    + {{#unless source.system.inventory.take}} +
    {{localize "DAGGERHEART.GENERAL.missingDragDropThingAlt" thing=(localize "Item")}}
    + {{/unless}} {{#each source.system.inventory.take}} {{#if this}}
    @@ -102,6 +111,9 @@
    {{localize "DAGGERHEART.ITEMS.Class.guide.inventory.thenChoose"}}
    + {{#unless source.system.inventory.choiceA}} +
    {{localize "DAGGERHEART.GENERAL.missingDragDropThingAlt" thing=(localize "Item")}}
    + {{/unless}} {{#each source.system.inventory.choiceA}} {{#if this}}
    @@ -119,6 +131,9 @@
    {{localize "DAGGERHEART.ITEMS.Class.guide.inventory.andEither"}}
    + {{#unless source.system.inventory.choiceB}} +
    {{localize "DAGGERHEART.GENERAL.missingDragDropThingAlt" thing=(localize "Item")}}
    + {{/unless}} {{#each source.system.inventory.choiceB}} {{#if this}}