This commit is contained in:
C-West8
2026-10-23 10:47:31 -05:00
parent 064246ce42
commit a9e31acaa4
2 changed files with 40 additions and 26 deletions

View File

@@ -71,29 +71,31 @@
{@const status = statusOf(node)}
<tr class:folder={node.isFolder}>
<td class="name" style:--depth={depth}>
{#if node.isFolder}
<button
type="button"
class="twisty"
aria-expanded={!collapsed.has(node.sourceId)}
aria-label="{collapsed.has(node.sourceId) ? 'Expand' : 'Collapse'} {node.name}"
onclick={() => toggle(node.sourceId)}
>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6 4l4 4-4 4" /></svg>
</button>
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true">
<path d="M1.5 3.5h5l1.5 1.5h6.5v8h-13z" />
</svg>
{:else}
<span class="twisty-spacer"></span>
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true">
<path d="M3.5 1.5h6l3 3v10h-9z M9.5 1.5v3h3" />
</svg>
{/if}
<span title={node.error ?? undefined}>{node.name}</span>
{#if node.problems > 0}
<span class="problems">{node.problems} failed inside</span>
{/if}
<div class="name-line">
{#if node.isFolder}
<button
type="button"
class="twisty"
aria-expanded={!collapsed.has(node.sourceId)}
aria-label="{collapsed.has(node.sourceId) ? 'Expand' : 'Collapse'} {node.name}"
onclick={() => toggle(node.sourceId)}
>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6 4l4 4-4 4" /></svg>
</button>
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true">
<path d="M1.5 3.5h5l1.5 1.5h6.5v8h-13z" />
</svg>
{:else}
<span class="twisty-spacer"></span>
<svg class="icon" viewBox="0 0 16 16" aria-hidden="true">
<path d="M3.5 1.5h6l3 3v10h-9z M9.5 1.5v3h3" />
</svg>
{/if}
<span title={node.error ?? undefined}>{node.name}</span>
{#if node.problems > 0}
<span class="problems">{node.problems} failed inside</span>
{/if}
</div>
</td>
<td><Badge {...status} /></td>
<td class="small"><TimeAgo date={node.isFolder ? null : node.modifiedAt} empty="" /></td
@@ -118,12 +120,23 @@
text-align: center;
}
/* Every row is one line, so cells centre on each other rather than sharing a baseline
(the arrow and icons have none). */
td {
vertical-align: middle;
}
/* The cell stays a table cell so its height and border match the row; the flex layout
lives on the line inside it. */
.name {
padding-left: calc(0.5rem + var(--depth) * 1.25rem);
min-width: 18rem;
}
.name-line {
display: flex;
align-items: center;
gap: 0.35rem;
padding-left: calc(0.5rem + var(--depth) * 1.25rem);
min-width: 18rem;
}
.folder .name {

View File

@@ -243,7 +243,8 @@ a {
.register td {
padding: 0.55rem 0.75rem;
border-bottom: 1px solid var(--rule);
vertical-align: top;
/* First lines line up across cells, whatever their size (badges, small text, wrapped text). */
vertical-align: baseline;
}
.register tr:last-child td {