mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-21 15:46:42 +02:00
The Clock app source is preserved in apps-archived/ for reference. This directory is excluded from the pnpm workspace. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
47 lines
1.1 KiB
Svelte
47 lines
1.1 KiB
Svelte
<script lang="ts">
|
|
import '../app.css';
|
|
import { onMount } from 'svelte';
|
|
import { isLoading as isLocaleLoading } from 'svelte-i18n';
|
|
import { theme } from '$lib/stores/theme.svelte';
|
|
import { authStore } from '$lib/stores/auth.svelte';
|
|
import { waitLocale } from '$lib/i18n';
|
|
import { ToastContainer, setupGlobalErrorHandler } from '@manacore/shared-ui';
|
|
import { AppLoadingSkeleton } from '$lib/components/skeletons';
|
|
|
|
let { children } = $props();
|
|
|
|
let loading = $state(true);
|
|
|
|
onMount(() => {
|
|
// Setup global error handling
|
|
const cleanupErrorHandler = setupGlobalErrorHandler();
|
|
|
|
// Initialize async operations
|
|
const init = async () => {
|
|
// Wait for locale to be loaded
|
|
await waitLocale();
|
|
|
|
// Initialize theme
|
|
theme.initialize();
|
|
|
|
// Initialize auth
|
|
await authStore.initialize();
|
|
|
|
loading = false;
|
|
};
|
|
|
|
init();
|
|
|
|
return cleanupErrorHandler;
|
|
});
|
|
</script>
|
|
|
|
<ToastContainer />
|
|
|
|
{#if $isLocaleLoading || loading}
|
|
<AppLoadingSkeleton />
|
|
{:else}
|
|
<div class="min-h-screen bg-background text-foreground">
|
|
{@render children()}
|
|
</div>
|
|
{/if}
|