2026-09-21 11:00:46 -04:00
|
|
|
<script lang="ts">
|
2026-09-22 12:40:32 -04:00
|
|
|
import { getVersion } from '@tauri-apps/api/app';
|
2026-09-22 14:48:26 -04:00
|
|
|
import { session, upgradePreview, reprocessCurrentVideo } from '$lib/stores/videoSession.svelte';
|
2026-09-21 11:00:46 -04:00
|
|
|
|
2026-09-22 12:40:32 -04:00
|
|
|
let { onOpenAbout }: { onOpenAbout?: () => void } = $props();
|
|
|
|
|
|
|
|
|
|
let appVersion = $state('');
|
|
|
|
|
|
|
|
|
|
$effect(() => {
|
|
|
|
|
getVersion().then((v) => {
|
|
|
|
|
appVersion = v;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
chore: stage all pending work — caption styling, media server, processing modal, docs, summaries
Includes:
- Extended caption styling (font, shadow, dimmed color, bg toggle)
- Media server, subtitle downloader, VTT parser, processing modal
- Waveform tiers, thumbnail/timeline improvements, transport controls
- Hybrid download model, dependency management, clip export enhancements
- 21 chat summaries, 2 implementation plans, 2 design specs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 10:48:16 -04:00
|
|
|
let previewPercent = $derived(Math.round(session.previewProgress * 100));
|
|
|
|
|
let exportPercent = $derived(Math.round(session.exportProgress * 100));
|
|
|
|
|
|
|
|
|
|
let isPreviewDownloading = $derived(
|
2026-09-21 11:00:46 -04:00
|
|
|
session.status === 'ready' &&
|
chore: stage all pending work — caption styling, media server, processing modal, docs, summaries
Includes:
- Extended caption styling (font, shadow, dimmed color, bg toggle)
- Media server, subtitle downloader, VTT parser, processing modal
- Waveform tiers, thumbnail/timeline improvements, transport controls
- Hybrid download model, dependency management, clip export enhancements
- 21 chat summaries, 2 implementation plans, 2 design specs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 10:48:16 -04:00
|
|
|
session.previewStatus === 'downloading' &&
|
|
|
|
|
session.previewProgress > 0 &&
|
|
|
|
|
session.previewProgress < 1
|
2026-09-21 11:00:46 -04:00
|
|
|
);
|
chore: stage all pending work — caption styling, media server, processing modal, docs, summaries
Includes:
- Extended caption styling (font, shadow, dimmed color, bg toggle)
- Media server, subtitle downloader, VTT parser, processing modal
- Waveform tiers, thumbnail/timeline improvements, transport controls
- Hybrid download model, dependency management, clip export enhancements
- 21 chat summaries, 2 implementation plans, 2 design specs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 10:48:16 -04:00
|
|
|
|
|
|
|
|
let isPreviewComplete = $derived(session.previewStatus === 'complete');
|
|
|
|
|
let isExportDownloading = $derived(session.exportStatus === 'downloading');
|
|
|
|
|
let isExportComplete = $derived(session.exportStatus === 'complete');
|
2026-09-22 14:48:26 -04:00
|
|
|
|
|
|
|
|
let canReprocess = $derived(
|
|
|
|
|
session.status === 'ready' &&
|
|
|
|
|
session.processingStep === 'done' &&
|
|
|
|
|
session.activeVideoPath !== null
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
let reprocessing = $state(false);
|
|
|
|
|
|
|
|
|
|
async function handleReprocess() {
|
|
|
|
|
reprocessing = true;
|
|
|
|
|
try {
|
|
|
|
|
await reprocessCurrentVideo();
|
|
|
|
|
} finally {
|
|
|
|
|
reprocessing = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-09-21 11:00:46 -04:00
|
|
|
</script>
|
|
|
|
|
|
2026-09-21 10:45:53 -04:00
|
|
|
<div class="status-bar">
|
chore: stage all pending work — caption styling, media server, processing modal, docs, summaries
Includes:
- Extended caption styling (font, shadow, dimmed color, bg toggle)
- Media server, subtitle downloader, VTT parser, processing modal
- Waveform tiers, thumbnail/timeline improvements, transport controls
- Hybrid download model, dependency management, clip export enhancements
- 21 chat summaries, 2 implementation plans, 2 design specs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 10:48:16 -04:00
|
|
|
{#if isPreviewDownloading}
|
|
|
|
|
<div class="progress-bar">
|
|
|
|
|
<div class="progress-fill" style="width: {previewPercent}%"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="status-text">Preview: {previewPercent}%</span>
|
|
|
|
|
{:else if isPreviewComplete && isExportDownloading}
|
|
|
|
|
<span class="status-text success">✓ Preview ready</span>
|
2026-09-21 11:00:46 -04:00
|
|
|
<div class="progress-bar">
|
chore: stage all pending work — caption styling, media server, processing modal, docs, summaries
Includes:
- Extended caption styling (font, shadow, dimmed color, bg toggle)
- Media server, subtitle downloader, VTT parser, processing modal
- Waveform tiers, thumbnail/timeline improvements, transport controls
- Hybrid download model, dependency management, clip export enhancements
- 21 chat summaries, 2 implementation plans, 2 design specs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 10:48:16 -04:00
|
|
|
<div class="progress-fill" style="width: {exportPercent}%"></div>
|
2026-09-21 11:00:46 -04:00
|
|
|
</div>
|
chore: stage all pending work — caption styling, media server, processing modal, docs, summaries
Includes:
- Extended caption styling (font, shadow, dimmed color, bg toggle)
- Media server, subtitle downloader, VTT parser, processing modal
- Waveform tiers, thumbnail/timeline improvements, transport controls
- Hybrid download model, dependency management, clip export enhancements
- 21 chat summaries, 2 implementation plans, 2 design specs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 10:48:16 -04:00
|
|
|
<span class="status-text">Best quality: {exportPercent}%</span>
|
|
|
|
|
{:else if isPreviewComplete && isExportComplete}
|
|
|
|
|
<span class="status-text success">✓ {session.title} — ready to export</span>
|
|
|
|
|
{#if session.showUpgradeToast}
|
|
|
|
|
<button class="upgrade-link" onclick={upgradePreview}>Reload Preview (HQ)</button>
|
|
|
|
|
{/if}
|
2026-09-21 11:00:46 -04:00
|
|
|
{:else if session.status === 'resolving'}
|
|
|
|
|
<span class="status-text">Resolving URL…</span>
|
chore: stage all pending work — caption styling, media server, processing modal, docs, summaries
Includes:
- Extended caption styling (font, shadow, dimmed color, bg toggle)
- Media server, subtitle downloader, VTT parser, processing modal
- Waveform tiers, thumbnail/timeline improvements, transport controls
- Hybrid download model, dependency management, clip export enhancements
- 21 chat summaries, 2 implementation plans, 2 design specs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 10:48:16 -04:00
|
|
|
{:else if session.status === 'ready' && session.previewStatus === 'idle'}
|
|
|
|
|
<span class="status-text">Preparing download…</span>
|
|
|
|
|
{:else if session.previewStatus === 'failed' || session.exportStatus === 'failed'}
|
2026-09-21 11:00:46 -04:00
|
|
|
<span class="status-text">Download failed</span>
|
|
|
|
|
{:else}
|
|
|
|
|
<span class="status-text">Ready</span>
|
|
|
|
|
{/if}
|
2026-09-22 14:48:26 -04:00
|
|
|
{#if canReprocess && !isPreviewDownloading}
|
|
|
|
|
<button
|
|
|
|
|
class="reprocess-btn"
|
|
|
|
|
onclick={handleReprocess}
|
|
|
|
|
disabled={reprocessing}
|
|
|
|
|
title="Reprocess video (re-extract waveform, thumbnails, keyframes)"
|
|
|
|
|
>
|
|
|
|
|
{reprocessing ? '⏳' : '↻'}
|
|
|
|
|
</button>
|
|
|
|
|
{/if}
|
2026-09-22 12:40:32 -04:00
|
|
|
{#if appVersion}
|
|
|
|
|
<button class="version-btn" onclick={() => onOpenAbout?.()} title="About GUI Video Clipper">
|
|
|
|
|
v{appVersion}
|
|
|
|
|
</button>
|
|
|
|
|
{/if}
|
2026-09-21 10:45:53 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.status-bar {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 4px 12px;
|
|
|
|
|
background: var(--bg-tertiary);
|
|
|
|
|
border-top: 1px solid var(--border);
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
min-height: 24px;
|
2026-09-21 11:00:46 -04:00
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.progress-bar {
|
|
|
|
|
flex: 1;
|
|
|
|
|
height: 4px;
|
|
|
|
|
background: var(--bg-primary);
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
max-width: 200px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.progress-fill {
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: var(--accent);
|
|
|
|
|
transition: width 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.success {
|
|
|
|
|
color: var(--success);
|
2026-09-21 10:45:53 -04:00
|
|
|
}
|
chore: stage all pending work — caption styling, media server, processing modal, docs, summaries
Includes:
- Extended caption styling (font, shadow, dimmed color, bg toggle)
- Media server, subtitle downloader, VTT parser, processing modal
- Waveform tiers, thumbnail/timeline improvements, transport controls
- Hybrid download model, dependency management, clip export enhancements
- 21 chat summaries, 2 implementation plans, 2 design specs
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 10:48:16 -04:00
|
|
|
|
|
|
|
|
.upgrade-link {
|
|
|
|
|
background: none;
|
|
|
|
|
border: 1px solid var(--accent, #89b4fa);
|
|
|
|
|
color: var(--accent, #89b4fa);
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
padding: 2px 8px;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.upgrade-link:hover {
|
|
|
|
|
background: var(--accent, #89b4fa);
|
|
|
|
|
color: var(--bg-primary, #1e1e2e);
|
|
|
|
|
}
|
2026-09-22 12:40:32 -04:00
|
|
|
|
2026-09-22 14:48:26 -04:00
|
|
|
.reprocess-btn {
|
|
|
|
|
background: none;
|
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.reprocess-btn:hover {
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.reprocess-btn:disabled {
|
|
|
|
|
opacity: 0.5;
|
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-22 12:40:32 -04:00
|
|
|
.version-btn {
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
background: none;
|
|
|
|
|
border: none;
|
|
|
|
|
color: var(--text-muted);
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
font-family: var(--font-mono);
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.version-btn:hover {
|
|
|
|
|
background: var(--bg-secondary);
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
}
|
2026-09-21 10:45:53 -04:00
|
|
|
</style>
|