mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
Support vaulting and unvaulting domain cards via dragdrop (#2070)
Some checks failed
Project CI / build (24.x) (push) Has been cancelled
Some checks failed
Project CI / build (24.x) (push) Has been cancelled
This commit is contained in:
parent
6cd19ada8a
commit
e55ef9fd9e
5 changed files with 63 additions and 51 deletions
|
|
@ -1,42 +1,43 @@
|
|||
<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 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
|
||||
inVault=false
|
||||
}}
|
||||
{{> '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>
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="loadout-section">
|
||||
<div class="loadout-section" data-in-vault="false">
|
||||
<div class="title">
|
||||
<side-line-div class="invert"></side-line-div>
|
||||
<h3>{{localize "DAGGERHEART.GENERAL.loadout"}}</h3>
|
||||
|
|
@ -118,11 +118,10 @@
|
|||
</div>
|
||||
<ul class="items-sidebar-list">
|
||||
{{#each document.system.domainCards.loadout as |card|}}
|
||||
{{> 'daggerheart.inventory-item-compact'
|
||||
item=card
|
||||
type='domainCard'
|
||||
}}
|
||||
|
||||
{{> 'daggerheart.inventory-item-compact'
|
||||
item=card
|
||||
type='domainCard'
|
||||
}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ Parameters:
|
|||
- showActions {boolean} : If true show feature's actions.
|
||||
--}}
|
||||
|
||||
<fieldset class="{{#if isGlassy}}glassy{{/if}} drop-section">
|
||||
<fieldset class="{{#if isGlassy}}glassy{{/if}} drop-section" {{#unless (isNullish inVault)}}data-in-vault="{{inVault}}"{{/unless}}>
|
||||
<legend>
|
||||
{{localize title}}
|
||||
{{#if canCreate}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue