mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 23:16:41 +02:00
Feat: Login localization, design, märchenzauber feature complete webapp
This commit is contained in:
parent
9c584a2580
commit
84f9343d25
47 changed files with 3254 additions and 175 deletions
|
|
@ -2,7 +2,7 @@ import { browser } from '$app/environment';
|
|||
import { init, register, locale, waitLocale } from 'svelte-i18n';
|
||||
|
||||
// List of supported locales
|
||||
export const supportedLocales = ['de', 'en'] as const;
|
||||
export const supportedLocales = ['de', 'en', 'it', 'fr', 'es'] as const;
|
||||
export type SupportedLocale = (typeof supportedLocales)[number];
|
||||
|
||||
// Default locale
|
||||
|
|
@ -11,6 +11,9 @@ const defaultLocale = 'de';
|
|||
// Register all available locales
|
||||
register('de', () => import('./locales/de.json'));
|
||||
register('en', () => import('./locales/en.json'));
|
||||
register('it', () => import('./locales/it.json'));
|
||||
register('fr', () => import('./locales/fr.json'));
|
||||
register('es', () => import('./locales/es.json'));
|
||||
|
||||
// Get initial locale from browser or localStorage
|
||||
function getInitialLocale(): SupportedLocale {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,18 @@
|
|||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import { locale } from 'svelte-i18n';
|
||||
import { LoginPage, setGoogleClientId, setAppleConfig } from '@manacore/shared-auth-ui';
|
||||
import { MemoroLogo } from '@manacore/shared-branding';
|
||||
import { getLoginTranslations } from '@manacore/shared-i18n';
|
||||
import AppSlider from '$lib/components/AppSlider.svelte';
|
||||
import LanguageSelector from '$lib/components/LanguageSelector.svelte';
|
||||
import { auth } from '$lib/stores/auth';
|
||||
import { env } from '$lib/config/env';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
// Get translations based on current locale
|
||||
const translations = $derived(getLoginTranslations($locale || 'de'));
|
||||
|
||||
// Configure OAuth on mount
|
||||
onMount(() => {
|
||||
if (env.oauth.googleClientId) {
|
||||
|
|
@ -42,6 +47,7 @@
|
|||
forgotPasswordPath="/forgot-password"
|
||||
lightBackground="#dddddd"
|
||||
darkBackground="#101010"
|
||||
{translations}
|
||||
>
|
||||
{#snippet headerControls()}
|
||||
<LanguageSelector />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue