feat: add About dialog with version, author, and license info

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-22 12:40:32 -04:00
parent 9096ed10db
commit 05c4b4713a
3 changed files with 164 additions and 1 deletions

View File

@@ -1,6 +1,17 @@
<script lang="ts">
import { getVersion } from '@tauri-apps/api/app';
import { session, upgradePreview } from '$lib/stores/videoSession.svelte';
let { onOpenAbout }: { onOpenAbout?: () => void } = $props();
let appVersion = $state('');
$effect(() => {
getVersion().then((v) => {
appVersion = v;
});
});
let previewPercent = $derived(Math.round(session.previewProgress * 100));
let exportPercent = $derived(Math.round(session.exportProgress * 100));
@@ -42,6 +53,11 @@
{:else}
<span class="status-text">Ready</span>
{/if}
{#if appVersion}
<button class="version-btn" onclick={() => onOpenAbout?.()} title="About GUI Video Clipper">
v{appVersion}
</button>
{/if}
</div>
<style>
@@ -91,4 +107,21 @@
background: var(--accent, #89b4fa);
color: var(--bg-primary, #1e1e2e);
}
.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);
}
</style>