mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 00:30:51 +00:00
update initals avatar if user changes name
This commit is contained in:
parent
40e1e212d4
commit
a0a064f4c8
@ -39,6 +39,11 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const submitHandler = async () => {
|
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(
|
const updatedUser = await updateUserProfile(localStorage.token, name, profileImageUrl).catch(
|
||||||
(error) => {
|
(error) => {
|
||||||
toast.error(error);
|
toast.error(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user