Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
a0a064f4
Commit
a0a064f4
authored
Apr 01, 2024
by
Danny Liu
Browse files
update initals avatar if user changes name
parent
40e1e212
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/lib/components/chat/Settings/Account.svelte
src/lib/components/chat/Settings/Account.svelte
+5
-0
No files found.
src/lib/components/chat/Settings/Account.svelte
View file @
a0a064f4
...
...
@@ -39,6 +39,11 @@
};
const submitHandler = async () => {
const isInitialsImage: boolean = profileImageUrl === generateInitialsImage($user.name) || profileImageUrl === '';
if (isInitialsImage && name !== $user.name) {
profileImageUrl = generateInitialsImage(name);
}
const updatedUser = await updateUserProfile(localStorage.token, name, profileImageUrl).catch(
(error) => {
toast.error(error);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment