fix(web): update avatar color immediately (#10393)

This commit is contained in:
Michel Heusschen 2024-06-16 17:38:32 +02:00 committed by GitHub
parent 010eb1e0d6
commit 0b08af7082
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 14 deletions

View file

@ -29,6 +29,7 @@
}
$preferences = await updateMyPreferences({ userPreferencesUpdateDto: { avatar: { color } } });
$user = { ...$user, profileImagePath: '', avatarColor: $preferences.avatar.color };
isShowSelectAvatar = false;
notificationController.show({
@ -52,9 +53,7 @@
class="mx-4 mt-4 flex flex-col items-center justify-center gap-4 rounded-3xl bg-white p-4 dark:bg-immich-dark-primary/10"
>
<div class="relative">
{#key $user}
<UserAvatar user={$user} size="xl" />
{/key}
<UserAvatar user={$user} size="xl" />
<div class="absolute z-10 bottom-0 right-0 rounded-full w-6 h-6">
<CircleIconButton
color="primary"
@ -96,6 +95,7 @@
</div>
</div>
</FocusTrap>
{#if isShowSelectAvatar}
<AvatarSelector
user={$user}