Browse Source

Merge pull request #2 from lainedfles/feat/profile-image-initials-fixes

Feat/profile image initials fixes
Danny Liu 1 year ago
parent
commit
7081755e19
2 changed files with 11 additions and 1 deletions
  1. 1 1
      src/lib/components/chat/Settings/Account.svelte
  2. 10 0
      src/routes/auth/+page.svelte

+ 1 - 1
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
 								}

+ 10 - 0
src/routes/auth/+page.svelte

@@ -43,6 +43,16 @@
 			}
 		);
 
+		if (!canvasPixelTest()) {
+			toast.error(
+				$i18n.t('Canvas pixel test failed: fingerprint evasion likely. Using default avatar image.'),
+				{
+					position: "bottom-center",
+					autoClose: 1000 * 10,
+				}
+			);
+		}
+
 		await setSessionUser(sessionUser);
 	};