Release 0.6.1
This commit is contained in:
1 parent
b80dded55d
commit
d586fbd8ce
29 files changed
+398
-66
No files matched your search
@@ -4,6 +4,7 @@
|
||||
import { onMount, tick, untrack } from 'svelte';
|
||||
import AppIcon from '#lib/components/AppIcon.svelte';
|
||||
import ThemeToggle from '#lib/components/ThemeToggle.svelte';
|
||||
import ShareManagement from '#lib/components/ShareManagement.svelte';
|
||||
import { formatClock, formatDuration } from '#lib/format.js';
|
||||
import type { PageProps } from './$types';
|
||||
|
||||
@@ -49,6 +50,9 @@
|
||||
let currentSection = $derived(
|
||||
data.live.sections.find((section) => section.id === data.live.current?.sectionId) ?? null
|
||||
);
|
||||
let viewedSection = $derived(
|
||||
data.live.sections.find((section) => section.id === viewedUsage?.sectionId) ?? null
|
||||
);
|
||||
let presentedUsage = $derived(
|
||||
allUsages.find((usage) => usage.id === data.live.presentationUsageId) ?? null
|
||||
);
|
||||
@@ -101,6 +105,16 @@
|
||||
data.live.sectionTimer.sectionId === data.live.current.sectionId
|
||||
)
|
||||
);
|
||||
|
||||
async function copyTwitchTags() {
|
||||
if (!viewedSection?.twitchTags.length) return;
|
||||
try {
|
||||
await navigator.clipboard.writeText(viewedSection.twitchTags.join(', '));
|
||||
popupMessage = 'Twitch-Tags kopiert.';
|
||||
} catch {
|
||||
popupMessage = 'Kopieren wurde vom Browser blockiert.';
|
||||
}
|
||||
}
|
||||
let runningOffsetSeconds = $derived(
|
||||
data.live.totalTimer.runningSinceUtc ? Math.max(0, Math.floor((now - loadedAt) / 1000)) : 0
|
||||
);
|
||||
@@ -577,6 +591,7 @@
|
||||
</section>
|
||||
<section>
|
||||
<strong>Ausgabekanal</strong>
|
||||
{#if data.canManageShares}<ShareManagement shows={[{ ...data.live.show, startsAtUtc: null }]} shares={data.shares} fixedShowId={data.live.show.id} {form} />{/if}
|
||||
<form method="POST" action={liveAction('createOutput')} use:enhance={enhanceOutput}>
|
||||
<input type="hidden" name="showId" value={data.live.show.id} />
|
||||
<button class="secondary-button" type="submit">Ausgabe verbinden und öffnen</button>
|
||||
@@ -794,12 +809,14 @@
|
||||
>
|
||||
<div class="live-current-scroll" bind:this={pieceScroller} onscroll={persistSettings}>
|
||||
<div class="live-piece-heading">
|
||||
<span class="live-piece-position">Piece {viewedPosition}/{data.live.totalCount}</span>
|
||||
<h1 id="current-title">{viewedUsage.title}</h1>
|
||||
{#if showTimes}<strong class="live-piece-time">
|
||||
{formatClock(viewedActualSeconds)} / {formatClock(viewedUsage.durationSeconds)}
|
||||
</strong>{/if}
|
||||
</div>
|
||||
{#if viewedSection?.twitchTags.length}<button class="text-button live-twitch-tags" type="button" onclick={copyTwitchTags}>
|
||||
<AppIcon name="copy" /> {viewedSection.twitchTags.join(' · ')}
|
||||
</button>{/if}
|
||||
|
||||
{#if viewedUsage.introHtml}<section class="live-script-section live-intro">
|
||||
<span>Einleitung</span>
|
||||
|
||||
Reference in new issue
Block a user