From 69716a5cec581f77d99760aad8f6d4e42405a00a Mon Sep 17 00:00:00 2001 From: Self Denial Date: Fri, 5 Apr 2024 22:31:40 -0600 Subject: [PATCH 1/4] Revert "omit canvas spoofing toast.error for signups" This reverts commit 1af62a70f0083ee0040b05dffec7a737998decb6. --- src/routes/auth/+page.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/routes/auth/+page.svelte b/src/routes/auth/+page.svelte index cf70456c8..0f2f428c8 100644 --- a/src/routes/auth/+page.svelte +++ b/src/routes/auth/+page.svelte @@ -43,6 +43,12 @@ } ); + if (!canvasPixelTest()) { + toast.error('Canvas pixel test failed, fingerprint evasion likely. Default image used.', { + autoClose: 1000 * 10 + }); + } + await setSessionUser(sessionUser); }; From bad7dca51ede5ca30749d387200bd086f276fb2b Mon Sep 17 00:00:00 2001 From: Self Denial Date: Fri, 5 Apr 2024 22:43:42 -0600 Subject: [PATCH 2/4] 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); From ae9922a2cd5f0c4970e1eefd7a000f43c3d2f5d3 Mon Sep 17 00:00:00 2001 From: Self Denial Date: Fri, 5 Apr 2024 22:58:40 -0600 Subject: [PATCH 3/4] Re-word account creation error to be more descriptive --- src/routes/auth/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/auth/+page.svelte b/src/routes/auth/+page.svelte index 28f4d6f6b..099d4a5b3 100644 --- a/src/routes/auth/+page.svelte +++ b/src/routes/auth/+page.svelte @@ -45,7 +45,7 @@ if (!canvasPixelTest()) { toast.error( - $i18n.t('Canvas pixel test failed, fingerprint evasion likely. Default image used.'), + $i18n.t('Canvas pixel test failed: fingerprint evasion likely. Using default avatar image.'), { position: "bottom-center", autoClose: 1000 * 10, From cf54adf5c43d8dd7b9cb16290ecc91ed2c392a4f Mon Sep 17 00:00:00 2001 From: Self Denial Date: Fri, 5 Apr 2024 23:01:48 -0600 Subject: [PATCH 4/4] Toast error consistency --- src/lib/components/chat/Settings/Account.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/chat/Settings/Account.svelte b/src/lib/components/chat/Settings/Account.svelte index 1dda14685..6c484b54b 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( - $i18n.t('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 }