Chore: Port over Extensions & Search

This commit is contained in:
Youwes09
2026-05-31 00:30:36 -05:00
parent 6de5207ce7
commit 13f2a483ca
47 changed files with 6086 additions and 1016 deletions
+23
View File
@@ -11,10 +11,23 @@
import Toaster from '$lib/components/chrome/Toaster.svelte'
import Settings from '$lib/components/settings/Settings.svelte'
import ThemeEditor from '$lib/components/settings/ThemeEditor.svelte'
import { downloadStore } from '$lib/state/downloads.svelte'
import { seriesState } from '$lib/state/series.svelte'
import MangaPreview from '$lib/components/shared/manga/MangaPreview.svelte'
import '../app.css'
let { children } = $props()
const POLL_MS = 1500
let pollTimer: ReturnType<typeof setTimeout> | null = null
let polling = false
async function pollLoop() {
if (!polling) return
await downloadStore.poll()
if (polling) pollTimer = setTimeout(pollLoop, POLL_MS)
}
const isTauri = typeof window !== 'undefined' && '__TAURI_INTERNALS__' in window
const ringFull = $derived(appState.status !== 'booting')
@@ -31,6 +44,8 @@
// Apply theme immediately on mount (before first paint if possible)
onMount(() => {
polling = true
pollLoop()
applyTheme(
settingsState.settings.theme ?? 'dark',
settingsState.settings.customThemes ?? []
@@ -55,6 +70,11 @@
mountSystemThemeSync(enabled, darkTheme, lightTheme, (id) => updateSettings({ theme: id }))
})
$effect(() => () => {
polling = false
if (pollTimer !== null) { clearTimeout(pollTimer); pollTimer = null }
})
function onSplashReady() { splashVisible = false }
function onSplashBypass() { bypassed = true; splashVisible = false }
@@ -107,6 +127,9 @@
<AuthGate />
<Toaster toasts={notifications.toasts} />
{#if seriesState.previewManga}
<MangaPreview />
{/if}
<style>
.frame {