From 924ebf035bfa5a5be5f95c188a63b709423f1e58 Mon Sep 17 00:00:00 2001 From: Self Denial Date: Sat, 6 Apr 2024 16:04:05 -0600 Subject: [PATCH] Fix: Restore Gravatar functionality, add button initials, toast duration - Restore Gravatar functionality - Add new button for "Use Initials" - Set both buttons to use text-left class - Update toast property autoClose to duration (wrong library, my bad!) - Update toast messages to clarify that this isn't "Gravatar" but "avatar" - Add i18n text to en-US/translation.json --- src/lib/components/chat/Settings/Account.svelte | 15 ++++++++++++--- src/lib/i18n/locales/en-US/translation.json | 2 ++ src/routes/auth/+page.svelte | 4 ++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/lib/components/chat/Settings/Account.svelte b/src/lib/components/chat/Settings/Account.svelte index df7c2056c..ce2c0b30f 100644 --- a/src/lib/components/chat/Settings/Account.svelte +++ b/src/lib/components/chat/Settings/Account.svelte @@ -6,6 +6,7 @@ import { updateUserProfile } from '$lib/apis/auths'; import UpdatePassword from './Account/UpdatePassword.svelte'; + import { getGravatarUrl } from '$lib/apis/utils'; import { generateInitialsImage, canvasPixelTest } from '$lib/utils'; import { copyToClipboard } from '$lib/utils'; @@ -146,20 +147,28 @@ + diff --git a/src/lib/i18n/locales/en-US/translation.json b/src/lib/i18n/locales/en-US/translation.json index 251834e00..e97df0c8c 100644 --- a/src/lib/i18n/locales/en-US/translation.json +++ b/src/lib/i18n/locales/en-US/translation.json @@ -150,6 +150,7 @@ "Failed to read clipboard contents": "", "File Mode": "", "File not found.": "", + "Fingerprint spoofing detected: default profile picture set. Disable to access Initial avatar!": "", "Focus chat input": "", "Format your variables using square brackets like this:": "", "From (Base Model)": "", @@ -340,6 +341,7 @@ "URL Mode": "", "Use '#' in the prompt input to load and select your documents.": "", "Use Gravatar": "", + "Use Initials": "", "user": "", "User Permissions": "", "Users": "", diff --git a/src/routes/auth/+page.svelte b/src/routes/auth/+page.svelte index 041640f73..f02bbdb4a 100644 --- a/src/routes/auth/+page.svelte +++ b/src/routes/auth/+page.svelte @@ -46,11 +46,11 @@ if (!canvasPixelTest()) { toast.info( $i18n.t( - 'Fingerprint spoofing detected: default profile picture set. Disable to access Initial gravatar!' + 'Fingerprint spoofing detected: default profile picture set. Disable to access Initial avatar!' ), { position: 'bottom-center', - autoClose: 1000 * 10 + duration: 1000 * 10 } ); }