From 6b07c361e4f4e2787c67441c0b61ddb0f3ca7ccd Mon Sep 17 00:00:00 2001 From: phoebus-84 Date: Tue, 10 Sep 2024 10:58:45 +0200 Subject: [PATCH] chores: update to last didroom components --- src/routes/+layout.svelte | 4 ++-- .../(protected)/(tabs)/profile/+page.svelte | 24 +++++++++++-------- .../(protected)/languages/+page.svelte | 16 +++++++------ 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 4825c1c..467ff67 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -56,11 +56,11 @@ /> diff --git a/src/routes/[[lang]]/(protected)/(tabs)/profile/+page.svelte b/src/routes/[[lang]]/(protected)/(tabs)/profile/+page.svelte index 04f4f7f..a916ae7 100644 --- a/src/routes/[[lang]]/(protected)/(tabs)/profile/+page.svelte +++ b/src/routes/[[lang]]/(protected)/(tabs)/profile/+page.svelte @@ -19,6 +19,7 @@ const gotoLanguageSettings = () => goto('/languages'); const gotoAccountSettings = () => goto('/user-settings'); + @@ -40,19 +41,22 @@
goto('/user-settings')} + on:languageSettingsClick={() => { + console.log("pppp") + goto('/languages') + }} + on:appSettingsClick={() => openAppSettings()} + on:logoutClick={() => goto('/logout')} />
diff --git a/src/routes/[[lang]]/(protected)/languages/+page.svelte b/src/routes/[[lang]]/(protected)/languages/+page.svelte index dcde6fa..9d1461d 100644 --- a/src/routes/[[lang]]/(protected)/languages/+page.svelte +++ b/src/routes/[[lang]]/(protected)/languages/+page.svelte @@ -4,6 +4,7 @@ import { setLanguagePreference } from '$lib/preferences/lang'; import { availableLanguageTags } from '$paraglide/runtime'; + const back = () => goto('/profile'); const recordLanguages = { en: 'English', es: 'EspaƱol', @@ -12,10 +13,15 @@ it: 'Italiano' }; $: activeLanguage = i18n.getLanguageFromUrl($page.url); - const back = () => goto('/profile') + function handleLanguageChange(language: 'en' | 'it') { + setLanguagePreference(language).then(() => { + activeLanguage = language; + window.location.replace(`/${language}/languages`); + }); + } - + {m.Languages()} @@ -33,11 +39,7 @@ {:else}