style(overlays): inline build-status badge in workshop actions row

Moves the build-status badge (e.g. "ok" / "never built") into the
workshop section's .table-actions row, paired with the Refresh from
Steam button via a new .table-actions-end flex grouping. Drops the
now-redundant "Add items" field-label (aria-label preserves a11y).
The _overlay_build_status.html partial gains an omit_badge flag so
the workshop block can render the badge inline without it duplicating
inside the partial below.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
mwiegand 2026-05-19 00:54:01 +02:00
parent 9763b8980c
commit 188fe546ed
No known key found for this signature in database
3 changed files with 19 additions and 6 deletions

View file

@ -1345,6 +1345,12 @@ div.modal.modal-wide {
margin-top: var(--space-m); margin-top: var(--space-m);
} }
.table-actions-end {
display: flex;
align-items: center;
gap: var(--space-m);
}
.workshop-input { .workshop-input {
font-family: var(--font-mono); font-family: var(--font-mono);
font-size: 0.875rem; font-size: 0.875rem;

View file

@ -1,9 +1,11 @@
<div id="overlay-build-status" <div id="overlay-build-status"
{% if latest_build_is_running %}hx-get="/overlays/{{ overlay.id }}/build-status" {% if latest_build_is_running %}hx-get="/overlays/{{ overlay.id }}/build-status"
hx-trigger="every 2s" hx-swap="outerHTML"{% endif %}> hx-trigger="every 2s" hx-swap="outerHTML"{% endif %}>
{% if not omit_badge %}
<div class="server-actions"> <div class="server-actions">
<span class="state-badge {{ build_state_class }}">{{ build_state_label }}</span> <span class="state-badge {{ build_state_class }}">{{ build_state_label }}</span>
</div> </div>
{% endif %}
{% if latest_build %} {% if latest_build %}
<p class="last-job"> <p class="last-job">
<a href="/jobs/{{ latest_build.id }}">{{ latest_build_phrase }}</a> <a href="/jobs/{{ latest_build.id }}">{{ latest_build_phrase }}</a>

View file

@ -46,9 +46,9 @@
<form method="post" action="/overlays/{{ overlay.id }}/items" class="stack"> <form method="post" action="/overlays/{{ overlay.id }}/items" class="stack">
<input type="hidden" name="csrf_token" value="{{ session.get('csrf_token', '') }}"> <input type="hidden" name="csrf_token" value="{{ session.get('csrf_token', '') }}">
<div class="field"> <div class="field">
<label class="field-label" for="workshop-input">Add items</label>
<p class="field-hint">Paste Steam Workshop IDs, item URLs, or collection URLs — one per line. Collections expand automatically.</p> <p class="field-hint">Paste Steam Workshop IDs, item URLs, or collection URLs — one per line. Collections expand automatically.</p>
<textarea id="workshop-input" name="input" rows="3" class="workshop-input" <textarea id="workshop-input" name="input" rows="3" class="workshop-input"
aria-label="Add workshop items"
placeholder="3726529483&#10;https://steamcommunity.com/sharedfiles/filedetails/?id=3724125665"></textarea> placeholder="3726529483&#10;https://steamcommunity.com/sharedfiles/filedetails/?id=3724125665"></textarea>
</div> </div>
<div class="form-actions-inline" style="justify-content: flex-end"> <div class="form-actions-inline" style="justify-content: flex-end">
@ -64,14 +64,19 @@
{% if can_edit and not latest_build_is_running %} {% if can_edit and not latest_build_is_running %}
<div class="table-actions"> <div class="table-actions">
<span class="field-hint">{% if workshop_items_count %}{{ workshop_items_count }} item{{ "s" if workshop_items_count != 1 else "" }}{% if workshop_items_total_size %} · {{ workshop_items_total_size }} total{% endif %}{% else %}0 items{% endif %}</span> <span class="field-hint">{% if workshop_items_count %}{{ workshop_items_count }} item{{ "s" if workshop_items_count != 1 else "" }}{% if workshop_items_total_size %} · {{ workshop_items_total_size }} total{% endif %}{% else %}0 items{% endif %}</span>
<div class="table-actions-end">
<span class="state-badge {{ build_state_class }}">{{ build_state_label }}</span>
<form method="post" action="/overlays/{{ overlay.id }}/refresh" class="inline-form"> <form method="post" action="/overlays/{{ overlay.id }}/refresh" class="inline-form">
<input type="hidden" name="csrf_token" value="{{ session.get('csrf_token', '') }}"> <input type="hidden" name="csrf_token" value="{{ session.get('csrf_token', '') }}">
<button type="submit" class="button-secondary" {% if not workshop_items_count %}disabled{% endif %}>↻ Refresh from Steam</button> <button type="submit" class="button-secondary" {% if not workshop_items_count %}disabled{% endif %}>↻ Refresh from Steam</button>
</form> </form>
</div> </div>
</div>
{% endif %} {% endif %}
{% with omit_badge=True %}
{% include "_overlay_build_status.html" %} {% include "_overlay_build_status.html" %}
{% endwith %}
{% endif %} {% endif %}
<h2 class="section-title">Files</h2> <h2 class="section-title">Files</h2>