Release 0.6.0
This commit is contained in:
1 parent
fd47910d09
commit
b80dded55d
40 files changed
+4080
-856
No files matched your search
@@ -30,6 +30,7 @@
|
||||
let railCloseButton = $state<HTMLButtonElement>();
|
||||
let liveMenuTrigger = $state<HTMLButtonElement>();
|
||||
let liveMenuPopover = $state<HTMLElement>();
|
||||
let completionDialog = $state<HTMLDialogElement>();
|
||||
let scrollPositions: Record<string, number> = {};
|
||||
let outputWindow: Window | null = null;
|
||||
let allUsages = $derived(data.live.sections.flatMap((section) => section.usages));
|
||||
@@ -144,6 +145,10 @@
|
||||
});
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
if (!data.completion && completionDialog?.open) completionDialog.close();
|
||||
});
|
||||
|
||||
onMount(() => {
|
||||
const key = `sendewerk-live-${data.live.show.id}`;
|
||||
try {
|
||||
@@ -611,34 +616,48 @@
|
||||
>
|
||||
</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
|
||||
{#if data.live.show.status === 'completed'}
|
||||
<p class="quiet-copy">Diese Sendung ist historisch abgeschlossen und unveränderlich.</p>
|
||||
<a class="secondary-button" href={resolve('/sendungen/[id]', { id: data.live.show.id })}
|
||||
>Historische Sendung öffnen</a
|
||||
>
|
||||
</form>
|
||||
<form
|
||||
method="POST"
|
||||
action={liveAction('startNewRun')}
|
||||
use:enhance={enhanceCommand}
|
||||
onsubmit={(event) => {
|
||||
if (
|
||||
!confirm(
|
||||
'Neuen Durchlauf starten? Fortschritt und Zeitmessungen werden zurückgesetzt.'
|
||||
{:else}
|
||||
<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
|
||||
>
|
||||
</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();
|
||||
}}
|
||||
>
|
||||
<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
|
||||
event.preventDefault();
|
||||
}}
|
||||
>
|
||||
</form>
|
||||
<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
|
||||
>
|
||||
</form>
|
||||
<button
|
||||
class="primary-button"
|
||||
type="button"
|
||||
onclick={() => completionDialog?.showModal()}
|
||||
>
|
||||
<AppIcon name="box-archive" /> Sendung abschließen
|
||||
</button>
|
||||
{/if}
|
||||
{:else}
|
||||
<form
|
||||
method="POST"
|
||||
@@ -723,6 +742,49 @@
|
||||
{#if popupMessage}<div class="live-message form-message" role="status">{popupMessage}</div>{/if}
|
||||
</div>
|
||||
|
||||
<dialog bind:this={completionDialog} class="completion-dialog">
|
||||
<form method="POST" action={liveAction('finalize')} use:enhance={enhanceCommand}>
|
||||
<header>
|
||||
<p class="eyebrow">Unveränderliche Historie</p>
|
||||
<h2>Sendung abschließen</h2>
|
||||
</header>
|
||||
<p>
|
||||
Der aktuelle Ablauf wird dauerhaft eingefroren. Übersprungene Pieces zählen nicht als
|
||||
gesendet.
|
||||
</p>
|
||||
{#if data.completion}
|
||||
<div class="completion-counts">
|
||||
<span><strong>{data.completion.doneCount}</strong> gesendet</span><span
|
||||
><strong>{data.completion.skippedCount}</strong> übersprungen</span
|
||||
><span><strong>{data.completion.openCount}</strong> offen</span>
|
||||
</div>
|
||||
<fieldset>
|
||||
<legend>Originale bewusst in den Fundus-Archivbereich legen</legend>
|
||||
{#each data.completion.candidates as candidate (candidate.pieceId)}<label
|
||||
class="check-row"
|
||||
><input type="checkbox" name="archivePieceIds" value={candidate.pieceId} /><span
|
||||
><strong>{candidate.title}</strong>{#if candidate.usageCount > 1}<small
|
||||
>{candidate.usageCount} gesendete Verwendungen</small
|
||||
>{/if}</span
|
||||
></label
|
||||
>{/each}
|
||||
{#if !data.completion.candidates.length}<p class="quiet-copy">
|
||||
Keine archivierbaren Originale vorhanden.
|
||||
</p>{/if}
|
||||
</fieldset>
|
||||
{/if}
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<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} />
|
||||
<footer>
|
||||
<button class="text-button" type="button" onclick={() => completionDialog?.close()}
|
||||
>Abbrechen</button
|
||||
><button class="primary-button" type="submit">Historischen Stand abschließen</button>
|
||||
</footer>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<div class="live-workspace">
|
||||
{#if viewedUsage}<article
|
||||
class="live-current"
|
||||
|
||||
Reference in new issue
Block a user