fix(Popup): hide theme settings on external popup (as variables can't be accessed from there)

This commit is contained in:
sethburkart123
2024-11-01 16:37:30 +11:00
parent 58d3172c5d
commit 3d458a185e
@@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
import BackgroundSelector from "@/svelte-interface/components/themes/BackgroundSelector.svelte" import BackgroundSelector from "@/svelte-interface/components/themes/BackgroundSelector.svelte"
import ThemeSelector from "@/svelte-interface/components/themes/ThemeSelector.svelte" import ThemeSelector from "@/svelte-interface/components/themes/ThemeSelector.svelte"
import { standalone } from "@/svelte-interface/utils/standalone.svelte"
// backgrounds // backgrounds
let selectedBackground = $state<string | null>(null); let selectedBackground = $state<string | null>(null);
@@ -11,6 +12,7 @@
</script> </script>
<div class="py-4"> <div class="py-4">
{#if !standalone}
<button <button
onclick={() => selectNoBackground()} onclick={() => selectNoBackground()}
class="w-full px-4 py-2 mb-4 text-[13px] dark:text-white transition rounded-xl bg-zinc-200 dark:bg-zinc-700/50"> class="w-full px-4 py-2 mb-4 text-[13px] dark:text-white transition rounded-xl bg-zinc-200 dark:bg-zinc-700/50">
@@ -24,4 +26,11 @@
<BackgroundSelector isEditMode={editMode} bind:selectedBackground={selectedBackground} bind:selectNoBackground={selectNoBackground} /> <BackgroundSelector isEditMode={editMode} bind:selectedBackground={selectedBackground} bind:selectNoBackground={selectNoBackground} />
<ThemeSelector isEditMode={editMode} /> <ThemeSelector isEditMode={editMode} />
</div> </div>
{:else}
<div class="flex items-center justify-center w-full h-full">
<div class="text-lg">
Open SEQTA and use the embedded settings to access theme settings. 🫠
</div>
</div>
{/if}
</div> </div>