settings page, reveal in explorer

This commit is contained in:
2026-05-11 23:59:29 +03:00
parent 2c041be5a9
commit 03af276a1d
5 changed files with 283 additions and 11 deletions
+36 -9
View File
@@ -11,6 +11,8 @@
type Phase = "idle" | "recording" | "editing" | "exporting" | "done"
let { onSettings }: { onSettings: () => void } = $props()
let phase: Phase = $state("idle")
let config: Config | null = $state(null)
let clip: RecordedClip | null = $state(null)
@@ -109,14 +111,17 @@
<main>
<header>
<h1>ByteSize</h1>
<p class="sub">
{#if phase === "recording"}recording...
{:else if phase === "editing"}clip ready
{:else if phase === "exporting"}encoding...
{:else if phase === "done"}exported
{:else}ready{/if}
</p>
<div class="title">
<h1>ByteSize</h1>
<p class="sub">
{#if phase === "recording"}recording...
{:else if phase === "editing"}clip ready
{:else if phase === "exporting"}encoding...
{:else if phase === "done"}exported
{:else}ready{/if}
</p>
</div>
<button class="settings-btn" onclick={onSettings} title="settings">⚙</button>
</header>
{#if phase === "idle"}
@@ -209,6 +214,9 @@
<p>final size: {formatBytes(exportResult.size_bytes)}</p>
<div class="row">
<button class="primary" onclick={startOver}>record another</button>
<button onclick={() => exportResult && api.revealInExplorer(exportResult.output_path)}>
show in explorer
</button>
</div>
</section>
{/if}
@@ -224,6 +232,12 @@
max-width: 720px;
margin: 0 auto;
}
header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 1.5rem;
}
header h1 {
margin: 0 0 0.25rem;
font-size: 1.5rem;
@@ -232,7 +246,20 @@
.sub {
color: #888;
font-size: 0.875rem;
margin: 0 0 1.5rem;
margin: 0;
}
.settings-btn {
font-size: 1.25rem;
padding: 0.25rem 0.5rem;
background: transparent;
border: 1px solid #2a2a2a;
color: #888;
border-radius: 4px;
cursor: pointer;
}
.settings-btn:hover {
color: #fff;
border-color: #888;
}
section {
margin: 1.25rem 0;