diff --git a/apps/manacore/apps/web/src/lib/stores/guest-mode.svelte.ts b/apps/manacore/apps/web/src/lib/stores/guest-mode.svelte.ts new file mode 100644 index 000000000..cfba169af --- /dev/null +++ b/apps/manacore/apps/web/src/lib/stores/guest-mode.svelte.ts @@ -0,0 +1,9 @@ +/** + * Guest Mode — local re-export from shared-stores. + * Avoids linter stripping the import from layout files. + */ +export { + createGuestMode, + type GuestMode, + type GuestModeNotification, +} from '@manacore/shared-stores'; diff --git a/apps/manacore/apps/web/src/routes/(app)/+layout.svelte b/apps/manacore/apps/web/src/routes/(app)/+layout.svelte index 6f2703a4b..8d5938cd3 100644 --- a/apps/manacore/apps/web/src/routes/(app)/+layout.svelte +++ b/apps/manacore/apps/web/src/routes/(app)/+layout.svelte @@ -22,7 +22,9 @@ import type { InputBarAdapter } from '$lib/quick-input/types'; import { getAdapterLoader } from '$lib/quick-input/registry'; import { createFallbackAdapter } from '$lib/quick-input/fallback-adapter'; - import { AuthGate } from '@manacore/shared-auth-ui'; + import { AuthGate, GuestWelcomeModal } from '@manacore/shared-auth-ui'; + import { createGuestMode, type GuestMode } from '$lib/stores/guest-mode.svelte'; + import { NotificationBar } from '@manacore/shared-ui'; import { tagLocalStore, tagMutations, useAllTags } from '$lib/stores/tags.svelte'; import { linkLocalStore, linkMutations } from '@manacore/shared-links'; import { manacoreStore } from '$lib/data/local-store'; @@ -199,7 +201,7 @@ } // ── Guest Mode ────────────────────────────────────────── - let guestMode: { destroy: () => void } | null = null; + let guestMode: GuestMode | null = null; // ── Onboarding ────────────────────────────────────────── function handleOnboardingComplete() { @@ -434,5 +436,24 @@ (showShortcuts = false)} /> + + + {#if guestMode && guestMode.notifications.length > 0} +
+ +
+ {/if} + + + {#if guestMode} + guestMode?.dismissWelcome()} + onLogin={() => goto('/login')} + onRegister={() => goto('/register')} + locale={($locale || 'de') === 'de' ? 'de' : 'en'} + /> + {/if}