From bad7dca51ede5ca30749d387200bd086f276fb2b Mon Sep 17 00:00:00 2001 From: Self Denial Date: Fri, 5 Apr 2024 22:43:42 -0600 Subject: [PATCH] Move login page toast error to the bottom of page and enable i18n for translation --- src/lib/components/chat/Settings/Account.svelte | 2 +- src/routes/auth/+page.svelte | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/components/chat/Settings/Account.svelte b/src/lib/components/chat/Settings/Account.svelte index 651a4ee03..1dda14685 100644 --- a/src/lib/components/chat/Settings/Account.svelte +++ b/src/lib/components/chat/Settings/Account.svelte @@ -152,7 +152,7 @@ profileImageUrl = generateInitialsImage(name); } else { toast.error( - 'Canvas pixel test failed, fingerprint evasion likely. Disable fingerprint evasion and try again!', + $i18n.t('Canvas pixel test failed, fingerprint evasion likely. Disable fingerprint evasion and try again!'), { autoClose: 1000 * 10 } diff --git a/src/routes/auth/+page.svelte b/src/routes/auth/+page.svelte index 0f2f428c8..28f4d6f6b 100644 --- a/src/routes/auth/+page.svelte +++ b/src/routes/auth/+page.svelte @@ -44,9 +44,13 @@ ); if (!canvasPixelTest()) { - toast.error('Canvas pixel test failed, fingerprint evasion likely. Default image used.', { - autoClose: 1000 * 10 - }); + toast.error( + $i18n.t('Canvas pixel test failed, fingerprint evasion likely. Default image used.'), + { + position: "bottom-center", + autoClose: 1000 * 10, + } + ); } await setSessionUser(sessionUser);