Add kiosk launcher downloads and player URL resolution

This commit is contained in:
2026-08-06 18:51:33 +01:00
parent 59730837ad
commit a4f8a807ff
23 changed files with 621 additions and 71 deletions
+48 -48
View File
@@ -13,58 +13,58 @@
</div>
</div>
<div class="card-body">
{{#if screens.length}}
<div class="screen-command-panel">
<div class="screen-command-panel-left">
<div class="screen-command-selector-field">
<label class="screen-command-selector-label" for="screen-command-select">Target screen group</label>
<div class="input-group input-group-sm">
<span class="input-group-text" aria-hidden="true"><i class="bi bi-broadcast"></i></span>
<select
id="screen-command-select"
class="form-select"
aria-label="Target screen group"
data-screen-command-select
>
{{#each screens}}
<option
value="{{slug}}"
data-screen-name="{{name}}"
data-player-connection-count="{{player_connection_count}}"
data-playlist-name="{{playlist_name}}"
>{{name}}</option>
{{/each}}
</select>
{{#if screens.length}}
<div class="screen-command-panel">
<div class="screen-command-panel-left">
<div class="screen-command-selector-field">
<label class="screen-command-selector-label" for="screen-command-select">Target screen group</label>
<div class="input-group input-group-sm">
<span class="input-group-text" aria-hidden="true"><i class="bi bi-broadcast"></i></span>
<select
id="screen-command-select"
class="form-select"
aria-label="Target screen group"
data-screen-command-select
>
{{#each screens}}
<option
value="{{slug}}"
data-screen-name="{{name}}"
data-player-connection-count="{{player_connection_count}}"
data-playlist-name="{{playlist_name}}"
>{{name}}</option>
{{/each}}
</select>
</div>
</div>
<div class="screen-command-actions">
<form method="post" action="#" class="inline-form" data-confirm-message="Reload selected screen?" data-async-command data-screen-command-form data-screen-command-action="reload">
<input type="hidden" name="command" value="reload" />
<button type="submit" class="btn btn-sm btn-danger"><i class="bi bi-arrow-repeat me-1" aria-hidden="true"></i>Reload screen</button>
</form>
<form method="post" action="#" class="inline-form" data-confirm-message="Pause selected screen?" data-async-command data-screen-command-form data-screen-command-action="pause">
<input type="hidden" name="command" value="pause" />
<input type="hidden" name="paused" value="true" />
<button type="submit" class="btn btn-sm btn-info"><i class="bi bi-pause-fill me-1" aria-hidden="true"></i>Pause screen</button>
</form>
<form method="post" action="#" class="inline-form" data-confirm-message="Blackout selected screen?" data-async-command data-screen-command-form data-screen-command-action="blackout">
<input type="hidden" name="command" value="blackout" />
<input type="hidden" name="blackout" value="true" />
<button type="submit" class="btn btn-sm btn-secondary"><i class="bi bi-eye-slash me-1" aria-hidden="true"></i>Blackout screen</button>
</form>
</div>
</div>
<div class="screen-command-actions">
<form method="post" action="#" class="inline-form" data-confirm-message="Reload selected screen?" data-async-command data-screen-command-form data-screen-command-action="reload">
<input type="hidden" name="command" value="reload" />
<button type="submit" class="btn btn-sm btn-danger"><i class="bi bi-arrow-repeat me-1" aria-hidden="true"></i>Reload screen</button>
</form>
<form method="post" action="#" class="inline-form" data-confirm-message="Pause selected screen?" data-async-command data-screen-command-form data-screen-command-action="pause">
<input type="hidden" name="command" value="pause" />
<input type="hidden" name="paused" value="true" />
<button type="submit" class="btn btn-sm btn-info"><i class="bi bi-pause-fill me-1" aria-hidden="true"></i>Pause screen</button>
</form>
<form method="post" action="#" class="inline-form" data-confirm-message="Blackout selected screen?" data-async-command data-screen-command-form data-screen-command-action="blackout">
<input type="hidden" name="command" value="blackout" />
<input type="hidden" name="blackout" value="true" />
<button type="submit" class="btn btn-sm btn-secondary"><i class="bi bi-eye-slash me-1" aria-hidden="true"></i>Blackout screen</button>
</form>
<div class="screen-command-panel-right">
<div class="screen-command-summary">
<span class="screen-command-pill is-live" data-screen-command-pill>Choose a screen</span>
<strong data-screen-command-name>Select a target screen group</strong>
<span class="screen-command-summary-meta" data-screen-command-meta>Commands update automatically for the selected screen group.</span>
</div>
</div>
</div>
<div class="screen-command-panel-right">
<div class="screen-command-summary">
<span class="screen-command-pill is-live" data-screen-command-pill>Choose a screen</span>
<strong data-screen-command-name>Select a target screen group</strong>
<span class="screen-command-summary-meta" data-screen-command-meta>Commands update automatically for the selected screen group.</span>
</div>
</div>
</div>
{{else}}
<div class="empty">No screen groups are available to target yet.</div>
{{/if}}
{{else}}
<div class="empty">No screen groups are available to target yet.</div>
{{/if}}
</div>
</div>
{{/if}}
+63 -3
View File
@@ -43,9 +43,9 @@
</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="row pb-4">
<div class="col-12 col-xl-8">
<div class="card card-outline card-primary dashboard-actions-card">
<div class="card-header">
<div class="dashboard-card-heading">
<h3 class="card-title">Quick actions</h3>
@@ -108,7 +108,67 @@
</div>
</div>
</div>
<div class="col-12 col-xl-4">
<div class="card card-outline card-secondary dashboard-launcher-card h-100">
<div class="card-header">
<div class="dashboard-card-heading">
<h3 class="card-title">Kiosk launchers</h3>
<p class="dashboard-card-subtitle">Open the player base URL on a device for onboarding.</p>
</div>
</div>
<div class="card-body">
<div class="dashboard-launcher-row h-100">
<p class="mb-0 text-muted small dashboard-launcher-copy">Download the Windows or Linux launcher to start a browser in kiosk mode and open the correct player page for onboarding.</p>
<div class="dashboard-launcher-actions h-100">
<button type="button" class="btn btn-outline-secondary btn-lg d-inline-flex align-items-center justify-content-center dashboard-launcher-open-button h-100" data-bs-toggle="modal" data-bs-target="#dashboard-kiosk-launcher-modal">
<i class="bi bi-download" aria-hidden="true"></i>
<span></span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
{{#> modal-shell modalId="dashboard-kiosk-launcher-modal" modalLabelId="dashboard-kiosk-launcher-modal-label" modalDialogClass="modal-dialog-centered modal-lg"}}
<div class="modal-header">
<div>
<h2 class="modal-title fs-5" id="dashboard-kiosk-launcher-modal-label">Kiosk launcher downloads</h2>
</div>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body d-grid gap-4">
<div class="alert alert-info mb-0">
<p class="mb-2 fw-semibold">Kiosk mode is for dedicated signage screens.</p>
<ul class="mb-0 ps-3">
<li>The script looks for a supported browser on the device and launches the first one it finds.</li>
<li>The launcher opens the correct player page automatically, so no manual URL entry is needed.</li>
<li>It uses a kiosk-mode browser window, so the screen stays focused on signage instead of normal browsing.</li>
<li>Exit with Alt+F4 on Windows or Linux. On Linux, that is usually the standard close-window shortcut too.</li>
</ul>
<div class="mt-3 pt-3 border-top">
<p class="mb-0 text-muted small">These downloads are scripts, not applications: the Windows download is a .bat file and the Linux download is a .sh file.</p>
</div>
</div>
<div class="dashboard-kiosk-launcher-confirmation p-3 border rounded-3 bg-body-tertiary">
<div class="form-check form-switch mb-0">
<input class="form-check-input" type="checkbox" value="1" id="dashboard-kiosk-launcher-confirm" data-kiosk-launcher-confirm />
<label class="form-check-label fw-semibold fs-5" for="dashboard-kiosk-launcher-confirm">I Understand</label>
</div>
<p class="mb-0 mt-2 text-muted small">Check this box to enable the Windows and Linux downloads.</p>
</div>
<div class="d-flex flex-column flex-sm-row gap-2">
<a class="btn btn-outline-primary btn-lg flex-fill disabled dashboard-kiosk-launcher-download" href="/downloads/kiosk/pulse-signage-kiosk.bat" data-kiosk-launcher-download aria-disabled="true" tabindex="-1">
<i class="bi bi-windows me-2" aria-hidden="true"></i>
<span>Download for Windows</span>
</a>
<a class="btn btn-outline-secondary btn-lg flex-fill disabled dashboard-kiosk-launcher-download" href="/downloads/kiosk/pulse-signage-kiosk.sh" data-kiosk-launcher-download aria-disabled="true" tabindex="-1">
<i class="bi bi-terminal me-2" aria-hidden="true"></i>
<span>Download for Linux</span>
</a>
</div>
</div>
{{/modal-shell}}
{{/if}}
{{#if (hasPermission currentUser "screens.read")}}