diff options
| author | Adam Malczewski <[email protected]> | 2026-06-01 09:13:44 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-01 09:13:44 +0900 |
| commit | bbc85ff04b6009ff77a72b93c5853eecf9cb3e82 (patch) | |
| tree | 137bf3fb87219edbd699a68beabe692f2a455f73 | |
| parent | 97c1b40ead19cdfe54b9a7aeb2c0fdcc1c9653b1 (diff) | |
| download | dispatch-bbc85ff04b6009ff77a72b93c5853eecf9cb3e82.tar.gz dispatch-bbc85ff04b6009ff77a72b93c5853eecf9cb3e82.zip | |
feat(header): remove copy + theme buttons; keep title, status, sidebar toggle
These move to dedicated sidebar panels (Debug panel and Settings panel
respectively) in follow-up commits. Header is now visibly cleaner: only
the Dispatch title (left), connection status indicator, and the Sidebar
toggle (right) remain.
| -rw-r--r-- | packages/frontend/src/lib/components/Header.svelte | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/packages/frontend/src/lib/components/Header.svelte b/packages/frontend/src/lib/components/Header.svelte index 713e916..3066e81 100644 --- a/packages/frontend/src/lib/components/Header.svelte +++ b/packages/frontend/src/lib/components/Header.svelte @@ -1,29 +1,8 @@ <script lang="ts"> import { router } from "../router.svelte.js"; -import { tabStore } from "../tabs.svelte.js"; import { wsClient } from "../ws.svelte.js"; -import ThemeSwitcher from "./ThemeSwitcher.svelte"; const { onToggleSidebar }: { onToggleSidebar: () => void } = $props(); - -let showThemeSwitcher = $state(false); -let copyLabel = $state("Copy"); - -function resetCopyLabel() { - copyLabel = "Copy"; -} - -async function handleCopy() { - const text = tabStore.copyConversation(); - try { - await navigator.clipboard.writeText(text); - copyLabel = "Copied"; - setTimeout(resetCopyLabel, 1500); - } catch { - copyLabel = "Failed"; - setTimeout(resetCopyLabel, 1500); - } -} </script> <header class="navbar bg-base-200 px-4 min-h-14 flex-shrink-0"> @@ -38,22 +17,6 @@ async function handleCopy() { <button type="button" class="btn btn-ghost btn-sm" - onclick={handleCopy} - aria-label="Copy conversation" - > - {copyLabel} - </button> - <button - type="button" - class="btn btn-ghost btn-sm" - onclick={() => (showThemeSwitcher = !showThemeSwitcher)} - aria-label="Switch theme" - > - Theme - </button> - <button - type="button" - class="btn btn-ghost btn-sm" onclick={onToggleSidebar} aria-label="Toggle sidebar" > @@ -61,7 +24,3 @@ async function handleCopy() { </button> </div> </header> - -{#if showThemeSwitcher} - <ThemeSwitcher onclose={() => (showThemeSwitcher = false)} /> -{/if} |
