start resources tab

This commit is contained in:
moliloo 2025-08-29 00:45:09 -03:00
parent 5b7272c2c7
commit 8b1850fc5c
5 changed files with 57 additions and 16 deletions

View file

@ -1876,6 +1876,7 @@
"story": "Story",
"biography": "Biography",
"general": "General",
"resources": "Resources",
"foundation": "Foundation",
"specialization": "Specialization",
"mastery": "Mastery",

View file

@ -22,13 +22,14 @@ export default class Party extends DHBaseActorSheet {
header: { template: 'systems/daggerheart/templates/sheets/actors/party/header.hbs' },
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
partyMembers: { template: 'systems/daggerheart/templates/sheets/actors/party/party-members.hbs' },
resources: { template: 'systems/daggerheart/templates/sheets/actors/party/resources.hbs' },
notes: { template: 'systems/daggerheart/templates/sheets/actors/party/notes.hbs' }
};
/** @inheritdoc */
static TABS = {
primary: {
tabs: [{ id: 'partyMembers' }, { id: 'notes' }],
tabs: [{ id: 'partyMembers' }, { id: 'resources' }, { id: 'notes' }],
initial: 'partyMembers',
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
}

View file

@ -6,21 +6,6 @@
max-height: 400px;
overflow: auto;
.actions-section {
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
gap: 20px;
background-color: light-dark(@dark-blue-10, @golden-10);
button {
span {
font-size: 12px;
}
}
}
.actors-list {
display: flex;
flex-direction: column;

View file

@ -24,5 +24,21 @@
display: flex;
flex-direction: column;
}
.actions-section {
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
margin-bottom: 10px;
gap: 20px;
background-color: light-dark(@dark-blue-10, @golden-10);
button {
span {
font-size: 12px;
}
}
}
}
}

View file

@ -0,0 +1,38 @@
<section
class='tab {{tabs.resources.cssClass}} {{tabs.resources.id}}'
data-tab='{{tabs.resources.id}}'
data-group='{{tabs.resources.group}}'
>
<div class="actions-section">
<button>
<i class="fa-solid fa-bed"></i>
<span>{{localize "DAGGERHEART.APPLICATIONS.Downtime.longRest.title"}}</span>
</button>
<button>
<i class="fa-solid fa-utensils"></i>
<span>{{localize "DAGGERHEART.APPLICATIONS.Downtime.shortRest.title"}}</span>
</button>
<button>
<i class="fa-solid fa-campground"></i>
<span>New Section</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|}}
{{> 'daggerheart.inventory-item'
item=actor
type='character'
isActor=true
}}
{{/each}}
</ul>
{{#unless document.system.partyMembers.length}}
<div class="actors-dragger">
<span>{{localize "DAGGERHEART.GENERAL.dropActorsHere"}}</span>
</div>
{{/unless}}
</fieldset>
</section>