Compare commits

..

4 commits

Author SHA1 Message Date
Carlos Fernandez
b73c70aeb8 Also remove fieldset for npc features and fix padding issue in full screen notes 2026-07-03 01:42:34 -04:00
Carlos Fernandez
7409a577f6 Remove certain fieldsets and adjust scrollsbars 2026-07-03 00:58:48 -04:00
Carlos Fernandez
53ed9fc792
More preliminary sheet work and refactors (#2057)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
2026-07-03 01:17:59 +02:00
Carlos Fernandez
e718c6b7b8
Fix item expand state not being retained across rerenders (#2056)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
2026-07-02 10:33:16 +02:00
42 changed files with 340 additions and 362 deletions

View file

@ -7,7 +7,7 @@ export default class AdversarySheet extends DHBaseActorSheet {
/** @inheritDoc */
static DEFAULT_OPTIONS = {
classes: ['adversary'],
position: { width: 645, height: 760 },
position: { width: 645, height: 750 },
window: { resizable: true },
actions: {
toggleHitPoints: AdversarySheet.#toggleHitPoints,

View file

@ -305,7 +305,7 @@ export default function DHApplicationMixin(Base) {
_preSyncPartState(partId, newElement, priorElement, state) {
super._preSyncPartState(partId, newElement, priorElement, state);
for (const el of priorElement.querySelectorAll('.extensible.extended')) {
const { actionId, itemUuid } = el.parentElement.dataset;
const { actionId, itemUuid } = el.closest('[data-item-uuid], [data-action-id]').dataset;
const selector = `${actionId ? `[data-action-id="${actionId}"]` : `[data-item-uuid="${itemUuid}"]`} .extensible`;
const newExtensible = newElement.querySelector(selector);
newExtensible?.classList.add('extended');

View file

@ -261,15 +261,14 @@
fieldset {
align-items: center;
margin: 0;
margin-top: 5px;
margin: 5px 0 0 0;
border-radius: 6px;
border-color: @color-fieldset-border;
padding-inline: 0.625rem;
&.glassy {
background-color: light-dark(@dark-blue-10, @golden-10);
border: none;
padding-inline: 10px;
legend {
padding: 2px 12px;
@ -514,7 +513,7 @@
height: 1px;
width: 100%;
border-bottom: 1px solid @color-border;
mask-image: linear-gradient(270deg, transparent 0%, black 35%, black 50%, black 65%, transparent 100%);
mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%);
}
side-line-div {
@ -548,6 +547,39 @@
transform-origin: top;
}
/* A multi-button element used to attach resources to other buttons */
.item-button {
display: flex;
button {
color: light-dark(@dark-blue, @dark-blue);
white-space: nowrap;
border: none;
&:hover {
color: @color-text-emphatic;
}
&:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding: 6px;
background: light-dark(@dark-blue-10, @golden-secondary);
color: light-dark(@dark-blue, @dark-golden);
&:hover {
background: light-dark(@light-black, @dark-blue);
color: light-dark(@dark-blue, @golden-secondary);
}
}
&:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right: 1px solid black;
}
}
}
.artist-attribution {
width: 100%;
display: flex;
@ -555,7 +587,7 @@
font-style: italic;
font-family: @font-body;
margin-top: 4px;
color: @color-text-subtle;
color: light-dark(#14142599, #efe6d850);
font-size: var(--font-size-12);
padding-left: 3px;
}

View file

@ -96,7 +96,7 @@
flex-wrap: wrap;
font-size: var(--font-size-12);
justify-content: start;
padding: 2px 5px;
padding: 3px 5px;
}
}
}

View file

@ -45,11 +45,8 @@
.item-main {
border-radius: 5px;
// Make hover extend out of bounds.
// Because of this extra spacing, the scroll container parent needs some padding
padding: 2px;
margin: -2px -2px 0 -2px;
margin: -2px;
}
&:hover {
@ -278,45 +275,9 @@
.item-buttons {
grid-column: span 3;
display: flex;
gap: 8px;
gap: 4px;
flex-wrap: wrap;
.item-button {
display: flex;
border: 1px solid light-dark(#18162e, #18162e);
color: light-dark(#18162e, #18162e);
outline: none;
box-shadow: none;
border-radius: 6px;
button {
border-radius: 3px 0px 0px 3px;
color: light-dark(@dark-blue, @dark-blue);
white-space: nowrap;
border: 0;
&:hover {
color: @color-text-emphatic;
}
&:not(:first-child) {
padding: 6px;
background: light-dark(@dark-blue-10, @golden-secondary);
border-radius: 0px 3px 3px 0px;
color: light-dark(@dark-blue, @dark-golden);
&:hover {
background: light-dark(@light-black, @dark-blue);
color: light-dark(@dark-blue, @golden-secondary);
}
}
}
.spacer {
border-right: 1px solid black;
content: '';
}
}
margin-top: 2px;
}
}

View file

@ -18,8 +18,6 @@
});
.application.sheet.daggerheart.actor.dh-style {
--side-indent: 16px;
.portrait img,
.profile {
width: 100%;
@ -49,24 +47,11 @@
}
.tab {
flex: 1;
padding: 0;
overflow: hidden;
.search-section {
padding: var(--spacer-16) 12px var(--spacer-8) 10px;
}
.scroll-container {
scrollbar-gutter: stable;
overflow-y: auto;
.with-scroll-shadows();
padding: var(--spacer-16) calc(var(--side-indent) - var(--scrollbar-width)) 4px var(--side-indent);
> fieldset:first-child {
margin-top: 0;
}
}
.scroll-container:not(:first-child) {
padding-top: var(--spacer-8); // nested have less top padding
padding: 12px 14px var(--spacer-8) 12px;
}
}
@ -75,7 +60,7 @@
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 10px;
padding: var(--spacer-8) var(--side-indent) var(--spacer-12) var(--side-indent);
padding: var(--spacer-8) 16px var(--spacer-8) 16px;
.input {
color: light-dark(@dark, @beige);
@ -86,7 +71,6 @@
.tab.notes.active {
padding: 0;
margin: 0;
margin-top: -10px; // will be removed once tab-navigation bottom margin is removed on all actor sheets
scrollbar-gutter: unset;
// Add padding around top level level prosemirrors used for note tabs
@ -95,6 +79,7 @@
.editor-content {
scrollbar-gutter: stable;
padding-right: @right-padding;
padding-bottom: 4px;
}
&.inactive {
button.toggle {
@ -105,7 +90,7 @@
}
}
&.active {
padding: 8px 0 4px 16px;
padding: 8px 0 0 16px;
}
}
@ -123,6 +108,7 @@
position: relative;
color: light-dark(@dark-blue-50, @beige-50);
width: 100%;
padding-top: 5px;
input {
border-radius: 50px;

View file

@ -7,6 +7,8 @@
display: flex;
flex-direction: column;
gap: 10px;
padding: 7px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
}
}
}

View file

@ -5,9 +5,8 @@
.application.sheet.daggerheart.actor.dh-style.adversary {
.tab.features {
.feature-section {
display: flex;
flex-direction: column;
gap: 10px;
padding: 16px calc(16px - var(--scrollbar-width)) 4px 16px;
.stable-scroll-container();
}
}
}

View file

@ -7,7 +7,7 @@
width: 100%;
> *:not(line-div, .tab-navigation) {
padding-left: var(--side-indent);
padding-left: 15px;
padding-right: 15px;
}

View file

@ -0,0 +1,3 @@
.application.sheet.daggerheart.actor.dh-style.adversary .tab.notes.active {
padding-bottom: 20px;
}

View file

@ -30,11 +30,9 @@
grid-row: 2;
grid-column: 2;
&.active {
overflow: hidden;
display: flex;
flex-direction: column;
margin: 0 0 10px 0;
position: relative;
}
}
}

View file

@ -8,11 +8,14 @@
display: flex;
flex-direction: column;
gap: 10px;
flex: 1;
height: 100%;
padding: 12px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
}
.characteristics-section {
gap: 20px;
padding: 0 4px;
}
.biography-section {

View file

@ -8,6 +8,8 @@
display: flex;
flex-direction: column;
gap: 10px;
padding: 7px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
}
}
}

View file

@ -8,6 +8,8 @@
display: flex;
flex-direction: column;
gap: 10px;
padding: 7px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
}
}
}

View file

@ -21,10 +21,10 @@
.character-header-sheet {
padding-top: var(--header-height);
width: 100%;
> *:not(line-div, .tab-navigation) {
margin-left: var(--side-indent);
margin-right: 15px;
padding-left: 15px;
padding-right: 15px;
}
.name-row {
@ -224,7 +224,7 @@
justify-content: space-between;
max-width: 38.5rem;
gap: 0.5rem;
padding-left: 0.5rem;
margin-left: 0.5rem;
.trait {
cursor: pointer;

View file

@ -7,7 +7,9 @@
.items-section {
display: flex;
flex-direction: column;
gap: 10px;
gap: 10px;
padding: 8px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
}
}
}

View file

@ -50,6 +50,8 @@
display: flex;
flex-direction: column;
gap: 10px;
padding: 8px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
}
}
}

View file

@ -2,8 +2,6 @@
@import '../../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character {
--side-indent: 16px;
.window-content {
display: grid;
grid-template-columns: 275px 1fr;
@ -12,34 +10,28 @@
width: 100%;
padding-bottom: 0;
overflow-x: auto;
}
.character-sidebar-sheet {
grid-row: 1 / span 2;
grid-column: 1;
display: flex;
flex-direction: column;
}
.character-header-sheet {
position: relative;
grid-row: 1;
grid-column: 2;
}
.tab {
grid-row: 2;
grid-column: 2;
padding-right: 0;
margin-right: 2px;
margin-bottom: 12px;
&.active {
.character-sidebar-sheet {
grid-row: 1 / span 2;
grid-column: 1;
display: flex;
flex-direction: column;
overflow: hidden;
margin: 0 0 10px 0;
padding: 0;
}
.character-header-sheet {
position: relative;
grid-row: 1;
grid-column: 2;
}
.tab {
grid-row: 2;
grid-column: 2;
&.active {
display: flex;
flex-direction: column;
margin: 0 0 10px 0;
}
}
}
}

View file

@ -1,7 +1,10 @@
@import '../../../utils/colors.less';
@import '../../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.companion {
.application.sheet.daggerheart.actor.dh-style.companion .tab.details.active {
padding: 12px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
.partner-section,
.attack-section,
.experience-list {

View file

@ -1,18 +1,13 @@
@import '../../../utils/colors.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.companion {
.tab.effects {
margin-right: 2px;
padding-right: 0;
.effects-sections {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
padding-bottom: 4px;
scrollbar-gutter: stable;
.with-scroll-shadows();
padding: 7px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
}
}
}

View file

@ -5,9 +5,8 @@
.application.sheet.daggerheart.actor.dh-style.environment {
.tab.features {
.feature-section {
display: flex;
flex-direction: column;
gap: 10px;
padding: 16px calc(16px - var(--scrollbar-width)) 4px 16px;
.stable-scroll-container();
}
}
}

View file

@ -138,11 +138,10 @@
}
.environment-navigation {
padding-right: 20px;
padding: 0 20px;
.tab-navigation {
margin-top: 0;
margin-bottom: 0;
}
}
}

View file

@ -1,5 +1,4 @@
@import '../../../utils/colors.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.environment {
.tab.potentialAdversaries {
@ -7,6 +6,8 @@
display: flex;
flex-direction: column;
gap: 10px;
padding: 7px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
}
}
}

View file

@ -14,9 +14,7 @@
.application.sheet.daggerheart.actor.dh-style.environment {
.tab {
flex: 1;
overflow-y: auto;
&.active {
overflow: hidden;
display: flex;

View file

@ -7,12 +7,8 @@
}
.feature-section {
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
padding-bottom: 4px;
.with-scroll-shadows();
padding: 16px calc(16px - var(--scrollbar-width)) 4px 16px;
.stable-scroll-container();
}
}
}

View file

@ -1,4 +1,4 @@
@import './sheet.less';
@import './header.less';
@import './party-members.less';
@import './sheet.less';
@import './inventory.less';

View file

@ -8,6 +8,10 @@
display: flex;
flex-direction: column;
gap: 10px;
overflow-y: auto;
margin-top: 20px;
padding-bottom: 4px;
.with-scroll-shadows();
}
}
}

View file

@ -2,10 +2,9 @@
@import '../../../utils/fonts.less';
@import '../../../utils/mixin.less';
.application.sheet.daggerheart.actor.dh-style.party .tab.partyMembers.active {
padding: var(--spacer-8) 4px 0 10px;
scrollbar-gutter: stable;
.with-scroll-shadows();
.application.sheet.daggerheart.actor.dh-style.party .tab.partyMembers {
padding: 12px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
.actions-section {
display: flex;

View file

@ -18,9 +18,7 @@
.application.sheet.daggerheart.actor.dh-style.party {
.tab.active {
overflow: auto;
display: flex;
flex-direction: column;
flex: 1;
}
}

View file

@ -198,3 +198,9 @@
transparent 100%
);
}
.stable-scroll-container() {
overflow-y: auto;
scrollbar-gutter: stable;
.with-scroll-shadows();
}

View file

@ -1,22 +1,22 @@
<section class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}' data-tab='{{tabs.effects.id}}'
data-group='{{tabs.effects.group}}'>
<div class="effects-sections scroll-container">
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.activeEffects'
type='effect'
isGlassy=true
collection=effects.actives
canCreate=@root.editable
hideResources=true
}}
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.inactiveEffects'
type='effect'
isGlassy=true
collection=effects.inactives
canCreate=@root.editable
hideResources=true
}}
</div>
<section class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}' data-tab='{{tabs.effects.id}}'
data-group='{{tabs.effects.group}}'>
<div class="effects-sections">
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.activeEffects'
type='effect'
isGlassy=true
collection=effects.actives
canCreate=@root.editable
hideResources=true
}}
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.inactiveEffects'
type='effect'
isGlassy=true
collection=effects.inactives
canCreate=@root.editable
hideResources=true
}}
</div>
</section>

View file

@ -1,8 +1,6 @@
<section
class="tab {{tabs.features.cssClass}} {{tabs.features.id}}"
data-tab="{{tabs.features.id}}"
data-group="{{tabs.features.group}}">
<div class="feature-section scroll-container">
<section class='tab {{tabs.features.cssClass}} {{tabs.features.id}}' data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'>
<div class="feature-section items-list">
{{#each @root.features as |item|}}
{{> "daggerheart.inventory-item"
item=item
@ -14,4 +12,4 @@
}}
{{/each}}
</div>
</section>
</section>

View file

@ -1,34 +1,34 @@
<section
class="tab {{tabs.biography.cssClass}} {{tabs.biography.id}}"
data-tab="{{tabs.biography.id}}"
data-group='{{tabs.biography.group}}'
>
<div class="items-section scroll-container">
<div class="characteristics-section flexrow">
<div class="input">
<span>{{localize 'DAGGERHEART.ACTORS.Character.pronouns'}}</span>
{{formInput systemFields.biography.fields.characteristics.fields.pronouns value=source.system.biography.characteristics.pronouns enriched=source.system.biography.characteristics.pronouns localize=true toggled=true}}
</div>
<div class="input">
<span>{{localize 'DAGGERHEART.ACTORS.Character.age'}}</span>
{{formInput systemFields.biography.fields.characteristics.fields.age value=source.system.biography.characteristics.age enriched=source.system.biography.characteristics.age localize=true toggled=true}}
</div>
<div class="input">
<span>{{localize 'DAGGERHEART.ACTORS.Character.faith'}}</span>
{{formInput systemFields.biography.fields.characteristics.fields.faith value=source.system.biography.characteristics.faith enriched=source.system.biography.characteristics.faith localize=true toggled=true}}
</div>
</div>
<fieldset class="glassy biography-section">
<legend>{{localize 'DAGGERHEART.ACTORS.Character.story.backgroundTitle'}}</legend>
{{formInput background.field value=background.value enriched=background.enriched toggled=true}}
</fieldset>
<fieldset class="glassy biography-section">
<legend>{{localize 'DAGGERHEART.ACTORS.Character.story.connectionsTitle'}}</legend>
{{formInput connections.field value=connections.value enriched=connections.enriched toggled=true}}
</fieldset>
</div>
<section
class='tab {{tabs.biography.cssClass}} {{tabs.biography.id}}'
data-tab='{{tabs.biography.id}}'
data-group='{{tabs.biography.group}}'
>
<div class="items-section">
<div class="characteristics-section flexrow">
<div class="input">
<span>{{localize 'DAGGERHEART.ACTORS.Character.pronouns'}}</span>
{{formInput systemFields.biography.fields.characteristics.fields.pronouns value=source.system.biography.characteristics.pronouns enriched=source.system.biography.characteristics.pronouns localize=true toggled=true}}
</div>
<div class="input">
<span>{{localize 'DAGGERHEART.ACTORS.Character.age'}}</span>
{{formInput systemFields.biography.fields.characteristics.fields.age value=source.system.biography.characteristics.age enriched=source.system.biography.characteristics.age localize=true toggled=true}}
</div>
<div class="input">
<span>{{localize 'DAGGERHEART.ACTORS.Character.faith'}}</span>
{{formInput systemFields.biography.fields.characteristics.fields.faith value=source.system.biography.characteristics.faith enriched=source.system.biography.characteristics.faith localize=true toggled=true}}
</div>
</div>
<fieldset class="glassy biography-section">
<legend>{{localize 'DAGGERHEART.ACTORS.Character.story.backgroundTitle'}}</legend>
{{formInput background.field value=background.value enriched=background.enriched toggled=true}}
</fieldset>
<fieldset class="glassy biography-section">
<legend>{{localize 'DAGGERHEART.ACTORS.Character.story.connectionsTitle'}}</legend>
{{formInput connections.field value=connections.value enriched=connections.enriched toggled=true}}
</fieldset>
</div>
</section>

View file

@ -1,24 +1,24 @@
<section class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}' data-tab='{{tabs.effects.id}}'
data-group='{{tabs.effects.group}}'>
<div class="effects-sections scroll-container">
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.activeEffects'
type='effect'
isGlassy=true
collection=effects.actives
canCreate=@root.editable
hideResources=true
}}
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.inactiveEffects'
type='effect'
isGlassy=true
collection=effects.inactives
canCreate=@root.editable
hideResources=true
disabled=true
}}
</div>
<section class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}' data-tab='{{tabs.effects.id}}'
data-group='{{tabs.effects.group}}'>
<div class="effects-sections">
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.activeEffects'
type='effect'
isGlassy=true
collection=effects.actives
canCreate=@root.editable
hideResources=true
}}
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.inactiveEffects'
type='effect'
isGlassy=true
collection=effects.inactives
canCreate=@root.editable
hideResources=true
disabled=true
}}
</div>
</section>

View file

@ -1,23 +1,21 @@
<section
class="tab {{tabs.features.cssClass}} {{tabs.features.id}}"
data-tab="{{tabs.features.id}}"
data-group="{{tabs.features.group}}">
<div class="features-section scroll-container">
<section class='tab {{tabs.features.cssClass}} {{tabs.features.id}}' data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'>
<div class="features-sections">
{{#each document.system.sheetLists as |category|}}
{{#if (eq category.type "feature" )}}
{{> "daggerheart.inventory-items"
{{#if (eq category.type 'feature' )}}
{{> 'daggerheart.inventory-items'
title=category.title
type="feature"
actorType="character"
type='feature'
actorType='character'
collection=category.values
canCreate=@root.editable
showActions=@root.editable
}}
{{else if category.values}}
{{> "daggerheart.inventory-items"
{{> 'daggerheart.inventory-items'
title=category.title
type="feature"
actorType="character"
type='feature'
actorType='character'
collection=category.values
canCreate=false
showActions=@root.editable

View file

@ -1,54 +1,54 @@
<section class='tab {{tabs.inventory.cssClass}} {{tabs.inventory.id}}' data-tab='{{tabs.inventory.id}}'
data-group='{{tabs.inventory.group}}'>
<div class="search-section">
<div class="search-bar">
<div class="icon">
<i class="fa-solid fa-magnifying-glass"></i>
</div>
<input type="search" name="search" class="search-inventory" placeholder="{{localize "DAGGERHEART.GENERAL.searchPlaceholder"}}">
</div>
<a class="filter-button">
<i class="fa-solid fa-filter"></i>
</a>
</div>
{{#if this.inventory.hasCurrency}}
{{> "systems/daggerheart/templates/sheets/global/partials/gold.hbs" currencies=inventory.currencies}}
{{/if}}
<div class="items-section scroll-container">
{{> 'daggerheart.inventory-items'
title='TYPES.Item.weapon'
type='weapon'
collection=@root.inventory.weapons
isGlassy=true
canCreate=@root.editable
hideResources=true
}}
{{> 'daggerheart.inventory-items'
title='TYPES.Item.armor'
type='armor'
collection=@root.inventory.armor
isGlassy=true
canCreate=@root.editable
hideResources=true
}}
{{> 'daggerheart.inventory-items'
title='TYPES.Item.consumable'
type='consumable'
collection=@root.inventory.consumables
isGlassy=true
canCreate=@root.editable
isQuantifiable=true
}}
{{> 'daggerheart.inventory-items'
title='TYPES.Item.loot'
type='loot'
collection=@root.inventory.loot
isGlassy=true
canCreate=@root.editable
showActions=@root.editable
isQuantifiable=true
}}
</div>
<section class='tab {{tabs.inventory.cssClass}} {{tabs.inventory.id}}' data-tab='{{tabs.inventory.id}}'
data-group='{{tabs.inventory.group}}'>
<div class="search-section">
<div class="search-bar">
<div class="icon">
<i class="fa-solid fa-magnifying-glass"></i>
</div>
<input type="search" name="search" class="search-inventory" placeholder="{{localize "DAGGERHEART.GENERAL.searchPlaceholder"}}">
</div>
<a class="filter-button">
<i class="fa-solid fa-filter"></i>
</a>
</div>
{{#if this.inventory.hasCurrency}}
{{> "systems/daggerheart/templates/sheets/global/partials/gold.hbs" currencies=inventory.currencies}}
{{/if}}
<div class="items-section">
{{> 'daggerheart.inventory-items'
title='TYPES.Item.weapon'
type='weapon'
collection=@root.inventory.weapons
isGlassy=true
canCreate=@root.editable
hideResources=true
}}
{{> 'daggerheart.inventory-items'
title='TYPES.Item.armor'
type='armor'
collection=@root.inventory.armor
isGlassy=true
canCreate=@root.editable
hideResources=true
}}
{{> 'daggerheart.inventory-items'
title='TYPES.Item.consumable'
type='consumable'
collection=@root.inventory.consumables
isGlassy=true
canCreate=@root.editable
isQuantifiable=true
}}
{{> 'daggerheart.inventory-items'
title='TYPES.Item.loot'
type='loot'
collection=@root.inventory.loot
isGlassy=true
canCreate=@root.editable
showActions=@root.editable
isQuantifiable=true
}}
</div>
</section>

View file

@ -1,42 +1,42 @@
<section class='tab {{tabs.loadout.cssClass}} {{tabs.loadout.id}}' data-tab='{{tabs.loadout.id}}'
data-group='{{tabs.loadout.group}}'>
<div class="search-section">
<div class="search-bar">
<div class="icon">
<i class="fa-solid fa-magnifying-glass"></i>
</div>
<input type="search" name="search" class="search-loadout" placeholder="{{localize "DAGGERHEART.GENERAL.searchPlaceholder"}}">
</div>
<a class="filter-button">
<i class="fa-solid fa-filter"></i>
</a>
<button type="button" class="btn-toggle-view" data-action="toggleLoadoutView" data-value="{{not cardView}}">
<span class="{{ifThen cardView '' 'list-active'}} list-icon">
<i class="fa-solid fa-bars"></i>
</span>
<span class="{{ifThen cardView 'grid-active' ''}} grid-icon">
<i class="fa-solid fa-grip"></i>
</span>
</button>
</div>
<div class="items-section scroll-container">
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.Tabs.loadout'
type='domainCard'
isGlassy=true
cardView=cardView
collection=document.system.domainCards.loadout
canCreate=@root.editable
}}
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.Tabs.vault'
type='domainCard'
isGlassy=true
cardView=cardView
collection=document.system.domainCards.vault
canCreate=@root.editable
inVault=true
}}
</div>
<section class='tab {{tabs.loadout.cssClass}} {{tabs.loadout.id}}' data-tab='{{tabs.loadout.id}}'
data-group='{{tabs.loadout.group}}'>
<div class="search-section">
<div class="search-bar">
<div class="icon">
<i class="fa-solid fa-magnifying-glass"></i>
</div>
<input type="search" name="search" class="search-loadout" placeholder="{{localize "DAGGERHEART.GENERAL.searchPlaceholder"}}">
</div>
<a class="filter-button">
<i class="fa-solid fa-filter"></i>
</a>
<button type="button" class="btn-toggle-view" data-action="toggleLoadoutView" data-value="{{not cardView}}">
<span class="{{ifThen cardView '' 'list-active'}} list-icon">
<i class="fa-solid fa-bars"></i>
</span>
<span class="{{ifThen cardView 'grid-active' ''}} grid-icon">
<i class="fa-solid fa-grip"></i>
</span>
</button>
</div>
<div class="items-section">
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.Tabs.loadout'
type='domainCard'
isGlassy=true
cardView=cardView
collection=document.system.domainCards.loadout
canCreate=@root.editable
}}
{{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.Tabs.vault'
type='domainCard'
isGlassy=true
cardView=cardView
collection=document.system.domainCards.vault
canCreate=@root.editable
inVault=true
}}
</div>
</section>

View file

@ -1,9 +1,9 @@
<section
class="tab {{tabs.features.cssClass}} {{tabs.features.id}}"
data-tab="{{tabs.features.id}}"
data-group="{{tabs.features.group}}"
class='tab {{tabs.features.cssClass}} {{tabs.features.id}}'
data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'
>
<div class="feature-section scroll-container">
<div class="feature-section items-list">
{{#each @root.features as |item|}}
{{> "daggerheart.inventory-item"
item=item

View file

@ -1,20 +1,20 @@
<section
class='tab {{tabs.potentialAdversaries.cssClass}} {{tabs.potentialAdversaries.id}}'
data-tab='{{tabs.potentialAdversaries.id}}'
data-group='{{tabs.potentialAdversaries.group}}'
>
<div class="items-section scroll-container">
{{#each document.system.potentialAdversaries as |category categoryId|}}
{{> 'daggerheart.inventory-items'
title=category.label
type='adversary'
isGlassy=true
isActor=true
categoryAdversary=categoryId
hideControls=true
collection=category.adversaries
hideResources=true
}}
{{/each}}
</div>
<section
class='tab {{tabs.potentialAdversaries.cssClass}} {{tabs.potentialAdversaries.id}}'
data-tab='{{tabs.potentialAdversaries.id}}'
data-group='{{tabs.potentialAdversaries.group}}'
>
<div class="items-section">
{{#each document.system.potentialAdversaries as |category categoryId|}}
{{> 'daggerheart.inventory-items'
title=category.label
type='adversary'
isGlassy=true
isActor=true
categoryAdversary=categoryId
hideControls=true
collection=category.adversaries
hideResources=true
}}
{{/each}}
</div>
</section>

View file

@ -1,14 +1,15 @@
<section class='tab {{tabs.features.cssClass}} {{tabs.features.id}}' data-tab='{{tabs.features.id}}'
data-group='{{tabs.features.group}}'>
<div class="feature-section">
{{> 'daggerheart.inventory-items'
title=tabs.features.label
type='feature'
collection=@root.features
hideContextMenu=true
hideModifyControls=true
canCreate=@root.editable
showActions=@root.editable
}}
<div class="feature-section items-list">
{{#each @root.features as |item|}}
{{> "daggerheart.inventory-item"
item=item
type="feature"
actorType=@root.document.type
hideContextMenu=true
hideModifyControls=true
showActions=@root.editable
}}
{{/each}}
</div>
</section>

View file

@ -19,7 +19,7 @@
{{> "systems/daggerheart/templates/sheets/global/partials/gold.hbs" currencies=inventory.currencies}}
{{/if}}
<div class="items-section scroll-container">
<div class="items-section">
{{> 'daggerheart.inventory-items'
title='TYPES.Item.weapon'
type='weapon'

View file

@ -158,7 +158,6 @@ Parameters:
</button>
{{/if}}
{{#if action.uses.max}}
<div class="spacer"></div>
<button type="button" class="action-uses-button" data-action="increaseActionUses" data-item-uuid="{{action.uuid}}">
{{action.remainingUses}}/{{action.uses.max}}
</button>