Refine live controls and compact show cards
This commit is contained in:
1 parent
01b5606a3b
commit
fd47910d09
5 files changed
+211
-64
No files matched your search
@@ -431,14 +431,15 @@
|
||||
aria-expanded={menuOpen}
|
||||
onclick={toggleLiveMenu}
|
||||
>
|
||||
Menü
|
||||
<AppIcon name="bars" />
|
||||
<span>Menü</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="live-status-row">
|
||||
<div class:active={Boolean(presentedUsage)} class="live-output-control">
|
||||
<div class="live-output-state" aria-live="polite">
|
||||
<span aria-hidden="true"></span>
|
||||
<span class="live-output-icon" aria-hidden="true"><AppIcon name="display" /></span>
|
||||
<div>
|
||||
<small>Ausgabe</small>
|
||||
<strong title={presentedUsage?.title ?? undefined}
|
||||
@@ -455,7 +456,9 @@
|
||||
<input type="hidden" name="usageId" value="" />
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
<button class="text-button" type="submit" disabled={Boolean(data.live.endedAtUtc)}>Präsentation leeren</button>
|
||||
<button class="text-button" type="submit" disabled={Boolean(data.live.endedAtUtc)}
|
||||
>Präsentation leeren</button
|
||||
>
|
||||
</form>{/if}
|
||||
</div>
|
||||
|
||||
@@ -467,8 +470,14 @@
|
||||
? 'Gelaufene Gesamtzeit, zu Restzeit wechseln'
|
||||
: 'Geschätzte Restzeit, zu gelaufener Zeit wechseln'}
|
||||
>
|
||||
<span>{timerDisplay === 'elapsed' ? 'Gelaufen' : 'Restzeit'}</span>
|
||||
<strong>{formatCountdown(timerDisplay === 'elapsed' ? totalElapsedSeconds : remainingSeconds)}</strong>
|
||||
<span class="timer-label"
|
||||
><AppIcon name="timer" /> {timerDisplay === 'elapsed' ? 'Gelaufen' : 'Restzeit'}</span
|
||||
>
|
||||
<strong
|
||||
>{formatCountdown(
|
||||
timerDisplay === 'elapsed' ? totalElapsedSeconds : remainingSeconds
|
||||
)}</strong
|
||||
>
|
||||
{#if timerDisplay === 'remaining' && data.live.remainingEstimate.unplannedSectionCount}
|
||||
<small title="Verbleibende Abschnitte ohne geplante Abschnittsdauer"
|
||||
>+ {data.live.remainingEstimate.unplannedSectionCount} ungeplant</small
|
||||
@@ -476,22 +485,42 @@
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
<div
|
||||
class:warning={hasActiveSectionTimer &&
|
||||
sectionRemainingSeconds <= 120 &&
|
||||
sectionRemainingSeconds >= 0}
|
||||
class:overrun={hasActiveSectionTimer && sectionRemainingSeconds < 0}
|
||||
class="section-countdown"
|
||||
aria-live="off"
|
||||
>
|
||||
<span>Abschnitt</span>
|
||||
<strong>
|
||||
{#if hasActiveSectionTimer}
|
||||
{sectionRemainingSeconds < 0
|
||||
? `+${formatCountdown(Math.abs(sectionRemainingSeconds))}`
|
||||
: formatCountdown(sectionRemainingSeconds)}
|
||||
{:else}Kein Countdown{/if}
|
||||
</strong>
|
||||
<div class="section-timer-control">
|
||||
<div
|
||||
class:warning={hasActiveSectionTimer &&
|
||||
sectionRemainingSeconds <= 120 &&
|
||||
sectionRemainingSeconds >= 0}
|
||||
class:overrun={hasActiveSectionTimer && sectionRemainingSeconds < 0}
|
||||
class="section-countdown"
|
||||
aria-live="off"
|
||||
>
|
||||
<span class="timer-label"><AppIcon name="timer" /> Abschnitt</span>
|
||||
<strong>
|
||||
{#if hasActiveSectionTimer}
|
||||
{sectionRemainingSeconds < 0
|
||||
? `+${formatCountdown(Math.abs(sectionRemainingSeconds))}`
|
||||
: formatCountdown(sectionRemainingSeconds)}
|
||||
{:else}Kein Countdown{/if}
|
||||
</strong>
|
||||
</div>
|
||||
{#if data.live.startedAtUtc && !data.live.endedAtUtc}<form
|
||||
method="POST"
|
||||
action={liveAction(data.live.isPaused ? 'resume' : 'pause')}
|
||||
use:enhance={enhanceCommand}
|
||||
>
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
<button
|
||||
class:paused={data.live.isPaused}
|
||||
class="live-timer-toggle"
|
||||
type="submit"
|
||||
aria-label={data.live.isPaused ? 'Sendung fortsetzen' : 'Sendung pausieren'}
|
||||
title={data.live.isPaused ? 'Sendung fortsetzen' : 'Sendung pausieren'}
|
||||
>
|
||||
<AppIcon name={data.live.isPaused ? 'play' : 'pause'} />
|
||||
</button>
|
||||
</form>{/if}
|
||||
</div>
|
||||
|
||||
<button
|
||||
@@ -561,7 +590,11 @@
|
||||
{#if !data.live.startedAtUtc}
|
||||
<form method="POST" action={liveAction('setStatus')} use:enhance={enhanceCommand}>
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<input type="hidden" name="status" value={data.live.show.status === 'ready' ? 'draft' : 'ready'} />
|
||||
<input
|
||||
type="hidden"
|
||||
name="status"
|
||||
value={data.live.show.status === 'ready' ? 'draft' : 'ready'}
|
||||
/>
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="showRevision" value={data.live.show.revision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
@@ -573,30 +606,45 @@
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
<button class="secondary-button" type="submit"><AppIcon name="play" /> Sendung starten</button>
|
||||
<button class="secondary-button" type="submit"
|
||||
><AppIcon name="play" /> Sendung starten</button
|
||||
>
|
||||
</form>
|
||||
{:else if data.live.endedAtUtc}
|
||||
<form method="POST" action={liveAction('resumeEnded')} use:enhance={enhanceCommand}>
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
<button class="secondary-button" type="submit"><AppIcon name="play" /> Lauf fortsetzen</button>
|
||||
<button class="secondary-button" type="submit"
|
||||
><AppIcon name="play" /> Lauf fortsetzen</button
|
||||
>
|
||||
</form>
|
||||
<form
|
||||
method="POST"
|
||||
action={liveAction('startNewRun')}
|
||||
use:enhance={enhanceCommand}
|
||||
onsubmit={(event) => {
|
||||
if (!confirm('Neuen Durchlauf starten? Fortschritt und Zeitmessungen werden zurückgesetzt.')) event.preventDefault();
|
||||
if (
|
||||
!confirm(
|
||||
'Neuen Durchlauf starten? Fortschritt und Zeitmessungen werden zurückgesetzt.'
|
||||
)
|
||||
)
|
||||
event.preventDefault();
|
||||
}}
|
||||
>
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
<button class="text-button" type="submit"><AppIcon name="arrow-rotate-left" /> Neuer Durchlauf</button>
|
||||
<button class="text-button" type="submit"
|
||||
><AppIcon name="arrow-rotate-left" /> Neuer Durchlauf</button
|
||||
>
|
||||
</form>
|
||||
{:else}
|
||||
<form method="POST" action={liveAction(data.live.isPaused ? 'resume' : 'pause')} use:enhance={enhanceCommand}>
|
||||
<form
|
||||
method="POST"
|
||||
action={liveAction(data.live.isPaused ? 'resume' : 'pause')}
|
||||
use:enhance={enhanceCommand}
|
||||
>
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
@@ -616,7 +664,9 @@
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
<button class="text-button" type="submit"><AppIcon name="arrow-rotate-left" /> Abschnittszeit zurücksetzen</button>
|
||||
<button class="text-button" type="submit"
|
||||
><AppIcon name="arrow-rotate-left" /> Abschnittszeit zurücksetzen</button
|
||||
>
|
||||
</form>{/if}
|
||||
<form
|
||||
method="POST"
|
||||
@@ -629,20 +679,25 @@
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
<button class="text-button" type="submit"><AppIcon name="timer" /> Gesamtzeit zurücksetzen</button>
|
||||
<button class="text-button" type="submit"
|
||||
><AppIcon name="timer" /> Gesamtzeit zurücksetzen</button
|
||||
>
|
||||
</form>
|
||||
<form
|
||||
method="POST"
|
||||
action={liveAction('end')}
|
||||
use:enhance={enhanceCommand}
|
||||
onsubmit={(event) => {
|
||||
if (!confirm('Sendung wirklich beenden? Offene Pieces bleiben offen.')) event.preventDefault();
|
||||
if (!confirm('Sendung wirklich beenden? Offene Pieces bleiben offen.'))
|
||||
event.preventDefault();
|
||||
}}
|
||||
>
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
<button class="text-button danger-text" type="submit"><AppIcon name="stop" /> Sendung beenden</button>
|
||||
<button class="text-button danger-text" type="submit"
|
||||
><AppIcon name="stop" /> Sendung beenden</button
|
||||
>
|
||||
</form>
|
||||
{/if}
|
||||
{#if needsResume && !data.live.endedAtUtc}<form
|
||||
@@ -924,7 +979,10 @@
|
||||
<input type="hidden" name="usageId" value={usage.id} />
|
||||
<input type="hidden" name="revision" value={data.live.liveRevision} />
|
||||
<input type="hidden" name="commandId" value={data.commandId} />
|
||||
<button type="submit" disabled={Boolean(data.live.endedAtUtc)} aria-label={`${usage.title} präsentieren`}
|
||||
<button
|
||||
type="submit"
|
||||
disabled={Boolean(data.live.endedAtUtc)}
|
||||
aria-label={`${usage.title} präsentieren`}
|
||||
><AppIcon name="display" /></button
|
||||
>
|
||||
</form>
|
||||
|
||||
Reference in new issue
Block a user