Skip to content

Commit 4f860e4

Browse files
committed
fix(settings): remove theme preview indicator
1 parent 501bf04 commit 4f860e4

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

src/features/settings/SettingsDrawer.svelte

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import DrawerCodeBackgroundSection from "./drawer/DrawerCodeBackgroundSection.svelte";
3030
import DrawerLineNumbersSection from "./drawer/DrawerLineNumbersSection.svelte";
3131
import DimColorPicker from "./DimColorPicker.svelte";
32-
import { THEMES } from "$lib/lib/themes";
3332
import type { SettingsPatch } from "$lib/lib/tauri-api";
3433
import type {
3534
GlobalAnimationKey,
@@ -94,7 +93,6 @@
9493
let activeTab = $state<DrawerTab>("theme");
9594
let railEl: HTMLElement | undefined = $state();
9695
let resetConfirmOpen = $state(false);
97-
let previewingThemeLabel: string | null = $state(null);
9896
9997
const previewProject = $derived(previewProjectSettings());
10098
const reduceMotion = $derived(
@@ -106,7 +104,6 @@
106104
$effect(() => {
107105
if (!open) {
108106
clearPreviewProjectSetting("theme");
109-
previewingThemeLabel = null;
110107
resetConfirmOpen = false;
111108
}
112109
});
@@ -209,13 +206,10 @@
209206
210207
function handlePreviewTheme(theme: ThemeName) {
211208
setPreviewProjectSetting("theme", theme);
212-
previewingThemeLabel =
213-
THEMES.find((candidate) => candidate.value === theme)?.label ?? theme;
214209
}
215210
216211
function clearThemePreview() {
217212
clearPreviewProjectSetting("theme");
218-
previewingThemeLabel = null;
219213
}
220214
221215
function resetThemeSection() {
@@ -289,10 +283,6 @@
289283
}
290284
</script>
291285

292-
<span class="sr-only" aria-live="polite">
293-
{previewingThemeLabel ? `Previewing ${previewingThemeLabel}` : ""}
294-
</span>
295-
296286
<button
297287
type="button"
298288
aria-label="Close settings drawer"
@@ -391,18 +381,6 @@
391381
</div>
392382
</div>
393383

394-
{#if previewingThemeLabel}
395-
<div
396-
class="mx-4 mt-3 flex shrink-0 items-center justify-between rounded-full border border-primary/20 bg-primary/10 px-3 py-1.5 text-xs text-primary shadow-sm"
397-
transition:fade={{ duration: reduceMotion ? 0 : 120 }}
398-
>
399-
<span class="font-medium">Previewing…</span>
400-
<span class="min-w-0 truncate text-[11px] text-primary/80">
401-
{previewingThemeLabel}
402-
</span>
403-
</div>
404-
{/if}
405-
406384
<div class="flex min-h-0 flex-1">
407385
<div
408386
bind:this={railEl}

0 commit comments

Comments
 (0)