Compare commits

..

1 commit

Author SHA1 Message Date
Carlos Fernandez
8f86d29569 Make sheet tab scrollbars stable and remove fieldsets 2026-07-01 20:22:25 -04:00
42 changed files with 362 additions and 340 deletions

View file

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

View file

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

View file

@ -261,14 +261,15 @@
fieldset { fieldset {
align-items: center; align-items: center;
margin: 5px 0 0 0; margin: 0;
margin-top: 5px;
border-radius: 6px; border-radius: 6px;
border-color: @color-fieldset-border; border-color: @color-fieldset-border;
padding-inline: 0.625rem;
&.glassy { &.glassy {
background-color: light-dark(@dark-blue-10, @golden-10); background-color: light-dark(@dark-blue-10, @golden-10);
border: none; border: none;
padding-inline: 10px;
legend { legend {
padding: 2px 12px; padding: 2px 12px;
@ -513,7 +514,7 @@
height: 1px; height: 1px;
width: 100%; width: 100%;
border-bottom: 1px solid @color-border; border-bottom: 1px solid @color-border;
mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%); mask-image: linear-gradient(270deg, transparent 0%, black 35%, black 50%, black 65%, transparent 100%);
} }
side-line-div { side-line-div {
@ -547,39 +548,6 @@
transform-origin: top; 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 { .artist-attribution {
width: 100%; width: 100%;
display: flex; display: flex;
@ -587,7 +555,7 @@
font-style: italic; font-style: italic;
font-family: @font-body; font-family: @font-body;
margin-top: 4px; margin-top: 4px;
color: light-dark(#14142599, #efe6d850); color: @color-text-subtle;
font-size: var(--font-size-12); font-size: var(--font-size-12);
padding-left: 3px; padding-left: 3px;
} }

View file

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

View file

@ -45,8 +45,11 @@
.item-main { .item-main {
border-radius: 5px; border-radius: 5px;
// Make hover extend out of bounds.
// Because of this extra spacing, the scroll container parent needs some padding
padding: 2px; padding: 2px;
margin: -2px; margin: -2px -2px 0 -2px;
} }
&:hover { &:hover {
@ -275,9 +278,45 @@
.item-buttons { .item-buttons {
grid-column: span 3; grid-column: span 3;
display: flex; display: flex;
gap: 4px; gap: 8px;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 2px;
.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: '';
}
}
} }
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,6 +2,8 @@
@import '../../../utils/fonts.less'; @import '../../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.character { .application.sheet.daggerheart.actor.dh-style.character {
--side-indent: 16px;
.window-content { .window-content {
display: grid; display: grid;
grid-template-columns: 275px 1fr; grid-template-columns: 275px 1fr;
@ -10,28 +12,34 @@
width: 100%; width: 100%;
padding-bottom: 0; padding-bottom: 0;
overflow-x: auto; overflow-x: auto;
}
.character-sidebar-sheet {
grid-row: 1 / span 2;
grid-column: 1;
display: flex;
flex-direction: column;
}
.character-sidebar-sheet { .character-header-sheet {
grid-row: 1 / span 2; position: relative;
grid-column: 1; grid-row: 1;
grid-column: 2;
}
.tab {
grid-row: 2;
grid-column: 2;
padding-right: 0;
margin-right: 2px;
margin-bottom: 12px;
&.active {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} overflow: hidden;
margin: 0 0 10px 0;
.character-header-sheet { padding: 0;
position: relative; 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,10 +1,7 @@
@import '../../../utils/colors.less'; @import '../../../utils/colors.less';
@import '../../../utils/fonts.less'; @import '../../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.companion .tab.details.active { .application.sheet.daggerheart.actor.dh-style.companion {
padding: 12px calc(12px - var(--scrollbar-width)) 4px 12px;
.stable-scroll-container();
.partner-section, .partner-section,
.attack-section, .attack-section,
.experience-list { .experience-list {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -198,9 +198,3 @@
transparent 100% 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}}' <section class='tab {{tabs.effects.cssClass}} {{tabs.effects.id}}' data-tab='{{tabs.effects.id}}'
data-group='{{tabs.effects.group}}'> data-group='{{tabs.effects.group}}'>
<div class="effects-sections"> <div class="effects-sections scroll-container">
{{> 'daggerheart.inventory-items' {{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.activeEffects' title='DAGGERHEART.GENERAL.activeEffects'
type='effect' type='effect'
isGlassy=true isGlassy=true
collection=effects.actives collection=effects.actives
canCreate=@root.editable canCreate=@root.editable
hideResources=true hideResources=true
}} }}
{{> 'daggerheart.inventory-items' {{> 'daggerheart.inventory-items'
title='DAGGERHEART.GENERAL.inactiveEffects' title='DAGGERHEART.GENERAL.inactiveEffects'
type='effect' type='effect'
isGlassy=true isGlassy=true
collection=effects.inactives collection=effects.inactives
canCreate=@root.editable canCreate=@root.editable
hideResources=true hideResources=true
}} }}
</div> </div>
</section> </section>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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