mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-13 07:04:39 +00:00
load theme upon installing
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
import ThemeCard from './ThemeCard.svelte';
|
import ThemeCard from './ThemeCard.svelte';
|
||||||
import ThemeModal from './ThemeModal.svelte';
|
import ThemeModal from './ThemeModal.svelte';
|
||||||
import { StoreDownloadTheme } from '@/seqta/ui/themes/downloadTheme'
|
import { StoreDownloadTheme } from '@/seqta/ui/themes/downloadTheme'
|
||||||
|
import { setTheme } from '@/seqta/ui/themes/setTheme';
|
||||||
|
|
||||||
let { themes, searchTerm } = $props<{ themes: Theme[]; searchTerm: string }>();
|
let { themes, searchTerm } = $props<{ themes: Theme[]; searchTerm: string }>();
|
||||||
let displayTheme = $state<Theme | null>();
|
let displayTheme = $state<Theme | null>();
|
||||||
@@ -38,6 +39,9 @@
|
|||||||
|
|
||||||
{#if displayTheme}
|
{#if displayTheme}
|
||||||
<ThemeModal theme={displayTheme} onClose={() => displayTheme = null} onInstall={() => {
|
<ThemeModal theme={displayTheme} onClose={() => displayTheme = null} onInstall={() => {
|
||||||
StoreDownloadTheme({themeContent: displayTheme as Theme});
|
StoreDownloadTheme({themeContent: displayTheme as Theme}).then(() => {
|
||||||
|
setTheme((displayTheme as Theme).id);
|
||||||
|
displayTheme = null;
|
||||||
|
});
|
||||||
}} onRemove={() => {}} />
|
}} onRemove={() => {}} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user