Fix: Splashscreen Appears on Boot

This commit is contained in:
Youwes09
2026-05-22 21:39:29 -05:00
parent 081becdd60
commit 6c39ef538f
3 changed files with 27 additions and 15 deletions
+19 -9
View File
@@ -10,25 +10,35 @@
let { children } = $props()
const isTauri = typeof window !== 'undefined' && '__TAURI_INTERNALS__' in window
const ringFull = $derived(appState.status !== 'booting')
const splashDone = $derived(
const isTauri = typeof window !== 'undefined' && '__TAURI_INTERNALS__' in window
const ringFull = $derived(appState.status !== 'booting')
let splashVisible = $state(true)
let bypassed = $state(false)
const showApp = $derived(
appState.status === 'ready' ||
appState.status === 'auth' ||
appState.status === 'error'
bypassed
)
let bypassed = $state(false)
const showApp = $derived(splashDone && (appState.status === 'ready' || appState.status === 'auth' || bypassed))
function onSplashReady() {
splashVisible = false
}
function onSplashBypass() {
bypassed = true
splashVisible = false
}
</script>
{#if !showApp}
{#if splashVisible}
<SplashScreen
mode="loading"
{ringFull}
failed={appState.status === 'error'}
onReady={() => {}}
onBypass={() => (bypassed = true)}
onReady={onSplashReady}
onBypass={onSplashBypass}
onRetry={() => window.location.reload()}
/>
{/if}