mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
Merge pull request #1386 from dannyl1u/feat/profile-image-initials
feat: default profile image with user initials
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import { WEBUI_NAME, config, user } from '$lib/stores';
|
||||
import { onMount, getContext } from 'svelte';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { generateInitialsImage, canvasPixelTest } from '$lib/utils';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@@ -36,10 +37,12 @@
|
||||
};
|
||||
|
||||
const signUpHandler = async () => {
|
||||
const sessionUser = await userSignUp(name, email, password).catch((error) => {
|
||||
toast.error(error);
|
||||
return null;
|
||||
});
|
||||
const sessionUser = await userSignUp(name, email, password, generateInitialsImage(name)).catch(
|
||||
(error) => {
|
||||
toast.error(error);
|
||||
return null;
|
||||
}
|
||||
);
|
||||
|
||||
await setSessionUser(sessionUser);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user