mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
[Feature] Redesign and merge party members and resources tabs (#1784)
This commit is contained in:
parent
7fa03c58e0
commit
7ca420ae0e
8 changed files with 522 additions and 357 deletions
|
|
@ -3,7 +3,6 @@
|
|||
<div class='item-container'>
|
||||
<div class="item-info">
|
||||
<h1 class='item-name'><input type='text' name='name' value='{{source.name}}' /></h1>
|
||||
<h2 class="label">Party</h2>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -18,24 +18,156 @@
|
|||
<i class="fa-solid fa-handshake-angle"></i>
|
||||
<span>Help Action</span>
|
||||
</button> --}}
|
||||
<button data-action="triggerRest" data-action="triggerRest" data-type="shortRest">
|
||||
<i class="fa-solid fa-utensils"></i>
|
||||
<span>{{localize "DAGGERHEART.APPLICATIONS.Downtime.shortRest.title"}}</span>
|
||||
</button>
|
||||
<button data-action="triggerRest" data-type="longRest">
|
||||
<i class="fa-solid fa-bed"></i>
|
||||
<span>{{localize "DAGGERHEART.APPLICATIONS.Downtime.longRest.title"}}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<fieldset class="actors-section glassy">
|
||||
<legend>{{localize tabs.partyMembers.label}}</legend>
|
||||
<ul class="actors-list">
|
||||
{{#each document.system.partyMembers as |actor id|}}
|
||||
{{> 'daggerheart.inventory-item'
|
||||
item=actor
|
||||
type='character'
|
||||
isActor=true
|
||||
hideContextMenu=true
|
||||
}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{#unless document.system.partyMembers.length}}
|
||||
<div class="actors-dragger">
|
||||
<span>{{localize "DAGGERHEART.GENERAL.dropActorsHere"}}</span>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</fieldset>
|
||||
</section>
|
||||
<ul class="actors-list">
|
||||
{{#each partyMembers as |member id|}}
|
||||
<li class="actor-resources">
|
||||
<div class="actor-img-frame">
|
||||
<img class="actor-img" src="{{member.img}}">
|
||||
{{#if member.weapons}}
|
||||
<div class="equipped-weapons">
|
||||
{{#each member.weapons as |weapon|}}
|
||||
<img src="{{weapon.img}}" data-tooltip="{{weapon.name}}"/>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if member.evasion includeZero=true}}
|
||||
<div class="evasion" data-tooltip="DAGGERHEART.GENERAL.evasion">{{member.evasion}}</div>
|
||||
{{/if}}
|
||||
{{#if member.difficulty includeZero=true}}
|
||||
<div class="evasion" data-tooltip="DAGGERHEART.GENERAL.difficulty">{{member.difficulty}}</div>
|
||||
{{/if}}
|
||||
{{#unless (eq member.type 'companion')}}
|
||||
<div class="threshold-section">
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.minor"}}</h4>
|
||||
<h4 class="threshold-value">{{member.damageThresholds.major}}</h4>
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.major"}}</h4>
|
||||
<h4 class="threshold-value">{{member.damageThresholds.severe}}</h4>
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.ACTORS.Party.Thresholds.severe"}}</h4>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
<header>
|
||||
<h2 class="actor-name">
|
||||
<a data-action="openDocument" data-uuid="{{member.uuid}}">{{member.name}}</a>
|
||||
<a class="delete-icon" data-action="deletePartyMember" data-uuid="{{member.uuid}}"><i class="fa-regular fa-times" inert></i></a>
|
||||
</h2>
|
||||
<div>
|
||||
{{#unless (or (eq member.type 'companion') (eq member.type 'adversary')) }}
|
||||
<div class="hope-section">
|
||||
<h4>{{localize "DAGGERHEART.GENERAL.hope"}}</h4>
|
||||
{{#times member.resources.hope.max}}
|
||||
<span class='hope-value' data-action='toggleHope' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
{{#if (gte member.resources.hope.value (add this 1))}}
|
||||
<i class='fa-solid fa-diamond'></i>
|
||||
{{else}}
|
||||
<i class='fa-regular fa-circle'></i>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/times}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
{{#if member.subtitle}}
|
||||
<span class="subtitle">{{member.subtitle}}</span>
|
||||
{{/if}}
|
||||
</header>
|
||||
<section class="body">
|
||||
<section class="resources">
|
||||
{{#unless (eq member.type 'companion') }}
|
||||
<div class="slot-section">
|
||||
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.HitPoints.plural">
|
||||
<span class="label">
|
||||
<i class="fa-solid fa-heart" inert></i>
|
||||
</span>
|
||||
<span class="value">
|
||||
<span class="current">{{member.resources.hitPoints.value}}</span>
|
||||
/
|
||||
<span class="max">{{member.resources.hitPoints.max}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="slot-bar">
|
||||
{{#times member.resources.hitPoints.max}}
|
||||
<span class='slot {{#if (gte member.resources.hitPoints.value (add this 1))}}filled{{/if}}'
|
||||
data-action='toggleHitPoints' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
</span>
|
||||
{{/times}}
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
<div class="slot-section">
|
||||
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.stress">
|
||||
<span class="label">
|
||||
<i class="fa-solid fa-bolt" inert></i>
|
||||
</span>
|
||||
<span class="value">
|
||||
<span class="current">{{member.resources.stress.value}}</span>
|
||||
/
|
||||
<span class="max">{{member.resources.stress.max}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="slot-bar">
|
||||
{{#times member.resources.stress.max}}
|
||||
<span class='slot {{#if (gte member.resources.stress.value (add this 1))}}filled{{/if}}'
|
||||
data-action='toggleStress' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
</span>
|
||||
{{/times}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if member.armorScore.max}}
|
||||
<div class="slot-section">
|
||||
<div class="slot-label" data-tooltip="DAGGERHEART.GENERAL.armorSlots">
|
||||
<span class="label">
|
||||
<i class="fa-solid fa-shield" inert></i>
|
||||
</span>
|
||||
<span class="value">
|
||||
<span class="current">{{member.armorScore.value}}</span>
|
||||
/
|
||||
<span class="max">{{member.armorScore.max}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="slot-bar">
|
||||
{{#times member.armorScore.max}}
|
||||
<a class='armor-slot' data-action='toggleArmorSlot' data-actor-id="{{member.uuid}}" data-value="{{add this 1}}">
|
||||
{{#if (gte member.armorScore.value (add this 1))}}
|
||||
<i class="fa-solid fa-shield"></i>
|
||||
{{else}}
|
||||
<i class="fa-solid fa-shield-halved"></i>
|
||||
{{/if}}
|
||||
</a>
|
||||
{{/times}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
{{#if member.traits}}
|
||||
<div class="traits">
|
||||
{{#each member.traits as |trait|}}
|
||||
<span class="trait">
|
||||
<span class="label">{{trait.label}}</span>
|
||||
<span class="value">{{trait.value}}</span>
|
||||
</span>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{#unless document.system.partyMembers.length}}
|
||||
<div class="actors-dragger">
|
||||
<span>{{localize "DAGGERHEART.GENERAL.dropActorsHere"}}</span>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -1,104 +0,0 @@
|
|||
<section
|
||||
class='tab {{tabs.resources.cssClass}} {{tabs.resources.id}}'
|
||||
data-tab='{{tabs.resources.id}}'
|
||||
data-group='{{tabs.resources.group}}'
|
||||
>
|
||||
<div data-action="triggerRest" data-type="longRest" class="actions-section">
|
||||
<button data-type="longRest">
|
||||
<i class="fa-solid fa-bed"></i>
|
||||
<span>{{localize "DAGGERHEART.APPLICATIONS.Downtime.longRest.title"}}</span>
|
||||
</button>
|
||||
<button data-action="triggerRest" data-type="shortRest">
|
||||
<i class="fa-solid fa-utensils"></i>
|
||||
<span>{{localize "DAGGERHEART.APPLICATIONS.Downtime.shortRest.title"}}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<fieldset class="resource-section glassy">
|
||||
<legend>{{localize tabs.resources.label}}</legend>
|
||||
<ul class="actors-list">
|
||||
{{#each document.system.partyMembers as |actor id|}}
|
||||
<li class="actor-resources">
|
||||
<h2 class="actor-name">{{actor.name}}</h2>
|
||||
<img class="actor-img" src="{{actor.img}}">
|
||||
<div class="resources">
|
||||
{{#unless (eq actor.type 'companion') }}
|
||||
<div class="slot-section">
|
||||
<div class="slot-bar">
|
||||
{{#times actor.system.resources.hitPoints.max}}
|
||||
<span class='slot {{#if (gte actor.system.resources.hitPoints.value (add this 1))}}filled{{/if}}'
|
||||
data-action='toggleHitPoints' data-actor-id="{{actor.uuid}}" data-value="{{add this 1}}">
|
||||
</span>
|
||||
{{/times}}
|
||||
</div>
|
||||
<div class="slot-label">
|
||||
<span class="label">{{localize "DAGGERHEART.GENERAL.HitPoints.short"}}</span>
|
||||
<span class="value">{{actor.system.resources.hitPoints.value}} / {{actor.system.resources.hitPoints.max}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
<div class="slot-section">
|
||||
<div class="slot-bar">
|
||||
{{#times actor.system.resources.stress.max}}
|
||||
<span class='slot {{#if (gte actor.system.resources.stress.value (add this 1))}}filled{{/if}}'
|
||||
data-action='toggleStress' data-actor-id="{{actor.uuid}}" data-value="{{add this 1}}">
|
||||
</span>
|
||||
{{/times}}
|
||||
</div>
|
||||
<div class="slot-label">
|
||||
<span class="label">{{localize "DAGGERHEART.GENERAL.stress"}}</span>
|
||||
<span class="value">{{actor.system.resources.stress.value}} / {{actor.system.resources.stress.max}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if actor.system.armorScore.max}}
|
||||
<div class="slot-section">
|
||||
<div class="slot-bar">
|
||||
{{#times actor.system.armorScore.max}}
|
||||
<a class='armor-slot' data-action='toggleArmorSlot' data-actor-id="{{actor.id}}" data-value="{{add this 1}}">
|
||||
{{#if (gte actor.system.armorScore.value (add this 1))}}
|
||||
<i class="fa-solid fa-shield"></i>
|
||||
{{else}}
|
||||
<i class="fa-solid fa-shield-halved"></i>
|
||||
{{/if}}
|
||||
</a>
|
||||
{{/times}}
|
||||
</div>
|
||||
<div class="slot-label">
|
||||
<span class="label">{{localize "DAGGERHEART.GENERAL.armorSlots"}}</span>
|
||||
<span class="value">{{actor.system.armorScore.value}} / {{actor.system.armorScore.max}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#unless (or (eq actor.type 'companion') (eq actor.type 'adversary')) }}
|
||||
<div class="hope-section">
|
||||
<h4>{{localize "DAGGERHEART.GENERAL.hope"}}</h4>
|
||||
{{#times actor.system.resources.hope.max}}
|
||||
<span class='hope-value' data-action='toggleHope' data-actor-id="{{actor.uuid}}" data-value="{{add this 1}}">
|
||||
{{#if (gte actor.system.resources.hope.value (add this 1))}}
|
||||
<i class='fa-solid fa-diamond'></i>
|
||||
{{else}}
|
||||
<i class='fa-regular fa-circle'></i>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/times}}
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
{{#unless (eq actor.type 'companion')}}
|
||||
<div class="threshold-section">
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.minor"}}</h4>
|
||||
<h4 class="threshold-value">{{actor.system.damageThresholds.major}}</h4>
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.major"}}</h4>
|
||||
<h4 class="threshold-value">{{actor.system.damageThresholds.severe}}</h4>
|
||||
<h4 class="threshold-label">{{localize "DAGGERHEART.GENERAL.DamageThresholds.severe"}}</h4>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</fieldset>
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue