Save worktree changes

This commit is contained in:
2026-07-25 02:29:19 +01:00
parent 8d3b7d557b
commit db9d718cd8
170 changed files with 11719 additions and 3414 deletions
+138
View File
@@ -0,0 +1,138 @@
<div class="page-header">
<div>
<h2>Dashboard</h2>
<p>Monitor screens and quick actions from one place.</p>
</div>
</div>
<section class="dashboard-hero card card-outline card-primary mb-4">
<div class="card-body dashboard-hero-body">
<div>
<span class="dashboard-hero-kicker">Live overview</span>
<h3 class="dashboard-hero-title">Keep the control surface focused on live state and actions.</h3>
<p class="dashboard-hero-copy">Use the cards below for the current totals, then jump to the screens table when you need a deeper look at playback and connection state.</p>
</div>
<div class="dashboard-hero-stats">
{{#if (hasPermission currentUser "playlists.read")}}
<div class="dashboard-hero-stat">
<span class="dashboard-hero-stat-value">{{playlists.length}}</span>
<span class="dashboard-hero-stat-label">playlists</span>
</div>
{{/if}}
{{#if (hasPermission currentUser "screens.read")}}
<div class="dashboard-hero-stat">
<span class="dashboard-hero-stat-value">{{screens.length}}</span>
<span class="dashboard-hero-stat-label">screens</span>
</div>
{{/if}}
{{#if (hasPermission currentUser "clients.read")}}
<div class="dashboard-hero-stat">
<span class="dashboard-hero-stat-value">{{connectedClientsCount}}</span>
<span class="dashboard-hero-stat-label">clients</span>
</div>
{{/if}}
</div>
</div>
</section>
{{#if (hasPermission currentUser "dashboard.allow")}}
<div class="row">
<div class="col-12">
<div class="card mb-4 card-outline card-primary dashboard-actions-card">
<div class="card-header">
<div class="dashboard-card-heading">
<h3 class="card-title">Quick actions</h3>
<p class="dashboard-card-subtitle">Send global commands without
leaving the overview.</p>
</div>
</div>
<div class="card-body">
<div class="dashboard-action-grid">
<form
method="post"
action="/commands"
class="dashboard-action-form"
data-confirm-message="Reload all connected clients?"
data-async-command
>
<input type="hidden" name="command" value="reload" />
<button
type="submit"
class="btn btn-danger dashboard-action-button"
id="dashboard-reload-all-button"
><i class="bi bi-arrow-repeat me-1" aria-hidden="true"></i>Reload all clients</button>
<span class="dashboard-action-help">Restart every connected player page.</span>
</form>
<form
method="post"
action="/commands"
class="dashboard-action-form"
data-confirm-message="Blackout all connected clients?"
data-async-command
>
<input type="hidden" name="command" value="blackout" />
<input type="hidden" name="blackout" value="true" />
<button
type="submit"
class="btn btn-secondary dashboard-action-button"
id="dashboard-blackout-all-button"
><i class="bi bi-eye-slash me-1" aria-hidden="false"></i>Blackout
all clients</button>
<span class="dashboard-action-help">Blank active players
immediately.</span>
</form>
</div>
</div>
</div>
</div>
</div>
{{/if}}
{{#if (hasPermission currentUser "screens.read")}}
<div class="row">
<div class="col-12">
<div class="card card-outline card-secondary dashboard-table-card">
<div class="card-header">
<div class="dashboard-card-heading">
<h3 class="card-title">Current screens</h3>
<p class="dashboard-card-subtitle">Player URL, playlist assignment,
and live connection count.</p>
</div>
</div>
<div class="card-body table-responsive p-0">
<table
id="dashboard-screens-table"
class="table table-striped w-100 mb-0"
>
<thead><tr><th>Name</th><th>Player URL</th><th>Playlist</th><th
>Connected clients</th></tr></thead>
<tbody>
{{#if screens.length}}
{{#each screens}}
<tr data-client-key="{{id}}">
<td data-label="Name">{{name}}</td>
<td data-label="Player URL"><a
href="{{playerUrl slug}}"
target="_blank"
>{{playerUrl slug}}</a></td>
<td data-label="Playlist">{{playlist_name}}</td>
<td data-label="Connected clients">
{{#if player_connection_count}}
<div class="connection-count">{{player_connection_count}}
connected</div>
{{else}}
<span class="empty">No clients connected.</span>
{{/if}}
</td>
</tr>
{{/each}}
{{else}}
<tr><td colspan="4" class="empty">No screens yet.</td></tr>
{{/if}}
</tbody>
</table>
</div>
</div>
</div>
</div>
{{/if}}