feat(settings): add background selector

This commit is contained in:
sethburkart123
2024-09-08 19:33:47 +10:00
parent f0bdbbb14f
commit c3cb2937c9
16 changed files with 420 additions and 165 deletions
@@ -1,11 +1,19 @@
<script lang="ts">
import BackgroundSelector from "@/svelte-interface/components/themes/BackgroundSelector.svelte"
// backgrounds
let selectedBackground = $state<string | null>(null);
let selectNoBackground = $state<() => void>(() => { });
let clearTheme = $derived(selectedBackground !== null);
let editMode = $state<boolean>(false);
</script>
<div class="pt-4">
<div class="py-4">
<button
onclick={() => selectNoBackground()}
class="w-full px-4 py-2 mb-4 text-[13px] text-white transition rounded-xl bg-zinc-700/50">
Clear Theme
{ clearTheme ? 'Clear Theme' : 'Select Theme' }
</button>
<BackgroundSelector isEditMode={editMode} bind:selectedBackground={selectedBackground} bind:selectNoBackground={selectNoBackground} />
</div>