Agent tab cleanup.

This commit is contained in:
Aaron Lutomski
2026-06-21 13:44:55 -07:00
parent aeee32c61f
commit 035c879bec
8 changed files with 246 additions and 19 deletions
+230
View File
@@ -1,4 +1,7 @@
.agent-sheet {
--dg-agent-section-gap: 8px;
--dg-agent-list-row-border: 1px solid rgba(33, 33, 33, 0.25);
.window-content {
display: grid;
grid-template-columns: 240px 1fr;
@@ -709,4 +712,231 @@
opacity: 0.45;
}
}
/* Shared tab helpers */
.agent-tab-hint {
margin: 6px 0 0;
font-size: 12px;
font-style: italic;
color: rgba(0, 0, 0, 0.55);
}
.is-crossed-out {
color: #888;
text-decoration: line-through;
}
.items-list .item {
border-bottom: var(--dg-agent-list-row-border);
}
.effects-list .effect {
border-bottom: var(--dg-agent-list-row-border);
}
/* Combat tab */
.tab.combat > div + div {
margin-top: var(--dg-agent-section-gap);
}
.tab.combat .first-aid-inline {
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
column-gap: 8px;
margin-bottom: var(--dg-agent-section-gap);
border: none;
padding: 0;
background: none;
.first-aid-label {
margin: 0;
justify-self: start;
}
.labeled-resource-checkbox {
justify-self: end;
}
}
.tab.combat .wounds-block {
.bolded-label {
display: block;
margin: 0 0 4px;
font-size: 12px;
}
.wounds {
box-sizing: border-box;
width: 100%;
min-height: 5rem;
margin: 0;
padding: 4px 6px;
resize: vertical;
border: 1px solid var(--dg-ink);
border-radius: 3px;
font-size: 12px;
}
}
.tab.combat .items-list .item-header,
.tab.combat .items-list .item:not(.item-header) {
display: grid;
grid-template-columns: 24px minmax(0, 1fr) minmax(4rem, auto) minmax(3rem, auto) 86px;
align-items: center;
column-gap: 5px;
}
.tab.combat .items-list .item:not(.item-header) > .flexrow {
display: contents;
}
.tab.combat .items-list .item:not(.item-header) .item-image {
margin-right: 0;
}
.tab.combat .items-list .item-header .item-image,
.tab.combat .items-list .item-header > span:not(.centered-item-property):not(.item-controls) {
min-width: 0;
}
/* Psychological tab */
.tab.motivations > div + div {
margin-top: var(--dg-agent-section-gap);
}
.tab.motivations .items-list .item-header .acute-episode-col,
.tab.motivations .items-list .item .acute-episode-col {
flex: 0 0 5.5rem;
text-align: center;
}
/* Equipment tab */
.tab.gear > div + div {
margin-top: var(--dg-agent-section-gap);
}
.tab.gear .items-list .centered-item-property {
flex: 0 0 auto;
}
/* Personal tab */
.tab.personal .bio-grid-2col,
.tab.personal .bio-grid-5col {
grid-template-columns: minmax(4rem, max-content) minmax(0, 1fr);
row-gap: 6px;
padding-bottom: var(--dg-agent-section-gap);
font-size: 12px;
span,
.bio-grid-label {
margin: 1px;
}
input.fill-remaining-space {
margin: 1px;
}
}
.tab.personal .bio-grid-5col {
grid-template-columns: minmax(4rem, max-content) minmax(0, 1fr) 20px minmax(
4rem,
max-content
) minmax(0, 1fr);
}
.tab.personal .notes-wrapper {
margin-top: var(--dg-agent-section-gap);
}
/* Effects tab */
.tab.effects .effect-add {
margin-bottom: var(--dg-agent-section-gap);
.action-pill {
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
width: 100%;
max-width: 100%;
text-align: center;
}
}
.tab.effects .effect-header {
box-sizing: border-box;
margin-top: var(--dg-agent-section-gap);
margin-bottom: 3px;
padding: 6px 8px;
background: var(--dg-surface-dark);
color: var(--dg-on-dark);
border: 0;
border-radius: 3px;
min-height: 30px;
font-weight: bold;
line-height: 1.2;
text-align: center;
&:first-of-type {
margin-top: 0;
}
.effect-source,
.effect-controls {
display: none;
}
.effect-label {
flex: 1 1 100%;
text-align: center;
}
}
.tab.effects .effects-list .effect {
min-height: 30px;
padding: 3px 0;
}
/* About tab */
.tab.about .about-section-header {
display: none;
}
.tab.about .dg-about-links {
display: flex;
flex-direction: column;
gap: var(--dg-agent-section-gap);
margin-bottom: var(--dg-agent-section-gap);
a {
display: flex;
align-items: center;
justify-content: center;
gap: var(--dg-agent-section-gap);
box-sizing: border-box;
width: 100%;
padding: 6px 8px;
text-align: center;
text-decoration: none;
border-radius: 2.5px;
background-color: rgba(0, 0, 0, 0.185);
font-weight: bold;
i {
flex: 0 0 auto;
}
span {
flex: 0 0 auto;
line-height: 1.4;
text-align: center;
}
}
}
.tab.about .dg-about-legal p {
margin: 0.5rem 0;
font-size: 12px;
}
}
+5
View File
@@ -113,6 +113,11 @@
color: var(--dg-ink);
}
.deltagreen .items-list .item-name.items-list-name-col {
flex: 1 1 55%;
min-width: 0;
}
.deltagreen .items-list {
list-style: none;
/*margin: 7px 0; */
@@ -62,8 +62,6 @@
{{/each}}
</ol>
<div>
<span>{{localizeWithFallback "DG.Generic.CheckDamagedBondsBoxUntilNextHomeScene" "Check a damaged Bond's box until the next Home scene ends." }}</span>
</div>
<p class="agent-tab-hint">{{localizeWithFallback "DG.Generic.CheckDamagedBondsBoxUntilNextHomeScene" "Check a damaged Bond's box until the next Home scene ends." }}</p>
</div>
@@ -3,7 +3,7 @@
</div>
<div>
<div class="first-aid-received-section resource">
<div class="first-aid-inline resource">
<label class="bolded-label first-aid-label"
title="{{localize 'DG.Tooltip.FirstAidAttempted'}}">
{{localize 'DG.Physical.FirstAidLabel'}}
@@ -15,9 +15,8 @@
data-dtype="Boolean"
title="{{localize 'DG.Tooltip.FirstAidAttempted'}}" />
</div>
<div>
<div class="wounds-block">
<label class="bolded-label">{{localize 'DG.Physical.Wounds'}}</label>
<textarea class="wounds" name="system.physical.wounds">{{actor.system.physical.wounds}}</textarea>
</div>
</div>
@@ -19,7 +19,7 @@
{{/if}}
</div>
<div style="min-width: 55%;" class="item-name">{{localize 'DG.Gear.Name'}}</div>
<div class="item-name items-list-name-col">{{localize 'DG.Gear.Name'}}</div>
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
@@ -40,7 +40,7 @@
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
</div>
<span style="min-width: 55%;" class="item-name">{{item.name}}</span>
<span class="item-name items-list-name-col">{{item.name}}</span>
<a class="centered-item-property"
data-action="toggle"
@@ -99,7 +99,7 @@
{{/if}}
</div>
<div style="min-width: 55%;" class="item-name">{{localize 'DG.Tomes.Name'}}</div>
<div class="item-name items-list-name-col">{{localize 'DG.Tomes.Name'}}</div>
<div class="item-controls">
<a class="item-control action-pill"
@@ -122,7 +122,7 @@
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
</div>
<span style="min-width: 55%;" class="item-name">
<span class="item-name items-list-name-col">
{{#if item.system.revealed }}
{{item.name}}
{{else}}
@@ -189,7 +189,7 @@
{{/if}}
</div>
<div style="min-width: 55%;" class="item-name">{{localize 'DG.Ritual.Name'}}</div>
<div class="item-name items-list-name-col">{{localize 'DG.Ritual.Name'}}</div>
<div class="item-controls">
<a class="item-control action-pill"
@@ -211,7 +211,7 @@
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
</div>
<span style="min-width: 55%;" class="item-name">
<span class="item-name items-list-name-col">
{{#if item.system.revealed }}
{{item.name}}
{{else}}
-2
View File
@@ -1,8 +1,6 @@
<div class="tab about {{tabs.about.cssClass}}"
data-group="primary"
data-tab="about">
<div class="about-section-header"></div>
<div class="dg-about-links flex horizontal-flex-column">
<a href="https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/blob/master/documentation/home.md"
target="_blank"
@@ -32,10 +32,7 @@
{{#if_eq item.type 'motivation' }}
<li class="item flexrow {{#if item.system.acuteEpisode}}acute-episode-active{{/if}}" data-item-id="{{item.id}}">
<span class="item-name"
{{#if item.system.crossedOut }}
style="text-decoration: line-through"
{{/if }}>
<span class="item-name {{#if item.system.crossedOut }}is-crossed-out{{/if}}">
{{item.name}}
</span>
@@ -6,7 +6,7 @@
<div class="horizontal-bar-section-divider">
<span>{{localize "DG.Sheet.BlockHeaders.PersonalInfoCV"}}</span>
</div>
<div class="bio-grid-5col bio-grid-top-border">
<div class="bio-grid-5col">
<span>{{localize 'DG.CV.Sex'}}</span>
<input class="fill-remaining-space"
type="text"