forked from open-webui/open-webui
		
	Merge pull request #1386 from dannyl1u/feat/profile-image-initials
feat: default profile image with user initials
This commit is contained in:
		
						commit
						02d3fb427b
					
				
					 8 changed files with 248 additions and 27 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
	};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue