martabal vor 1 Jahr
Ursprung
Commit
8c1e782f8f

+ 0 - 2
server/src/domain/user/user.service.ts

@@ -60,8 +60,6 @@ export class UserService {
 
 
   async update(authUser: AuthUserDto, dto: UpdateUserDto): Promise<UserResponseDto> {
   async update(authUser: AuthUserDto, dto: UpdateUserDto): Promise<UserResponseDto> {
     await this.findOrFail(dto.id, {});
     await this.findOrFail(dto.id, {});
-    if (dto.profileImagePath === '') {
-    }
     return this.userCore.updateUser(authUser, dto.id, dto).then(mapUser);
     return this.userCore.updateUser(authUser, dto.id, dto).then(mapUser);
   }
   }
 
 

+ 4 - 2
web/src/lib/components/shared-components/user-avatar.svelte

@@ -1,5 +1,5 @@
 <script lang="ts" context="module">
 <script lang="ts" context="module">
-  export type Size = 'full' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
+  export type Size = 'full' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl';
 </script>
 </script>
 
 
 <script lang="ts">
 <script lang="ts">
@@ -46,6 +46,7 @@
     lg: 'w-12 h-12',
     lg: 'w-12 h-12',
     xl: 'w-20 h-20',
     xl: 'w-20 h-20',
     xxl: 'w-24 h-24',
     xxl: 'w-24 h-24',
+    xxxl: 'w-24 h-24',
   };
   };
 
 
   // Get color based on the user UUID.
   // Get color based on the user UUID.
@@ -86,7 +87,8 @@
       class:text-xs={size === 'sm'}
       class:text-xs={size === 'sm'}
       class:text-lg={size === 'lg'}
       class:text-lg={size === 'lg'}
       class:text-xl={size === 'xl'}
       class:text-xl={size === 'xl'}
-      class:text-3xl={size === 'xxl'}
+      class:text-2xl={size === 'xxl'}
+      class:text-3xl={size === 'xxxl'}
       class:font-medium={!autoColor}
       class:font-medium={!autoColor}
       class:font-semibold={autoColor}
       class:font-semibold={autoColor}
     >
     >

+ 1 - 1
web/src/lib/components/user-settings-page/avatar-selector.svelte

@@ -39,7 +39,7 @@
           {#each colors as color}
           {#each colors as color}
             <div>
             <div>
               <button on:click={() => dispatch('choose', color)}>
               <button on:click={() => dispatch('choose', color)}>
-                <UserAvatar {user} {color} size="xxl" showProfileImage={false} />
+                <UserAvatar {user} {color} size="xxxl" showProfileImage={false} />
               </button>
               </button>
             </div>
             </div>
           {/each}
           {/each}

+ 2 - 1
web/src/test-data/factories/user-factory.ts

@@ -1,4 +1,4 @@
-import type { UserResponseDto } from '@api';
+import { UpdateUserDtoAvatarColorEnum, type UserResponseDto } from '@api';
 import { faker } from '@faker-js/faker';
 import { faker } from '@faker-js/faker';
 import { Sync } from 'factory.ts';
 import { Sync } from 'factory.ts';
 
 
@@ -17,4 +17,5 @@ export const userFactory = Sync.makeFactory<UserResponseDto>({
   updatedAt: Sync.each(() => faker.date.past().toISOString()),
   updatedAt: Sync.each(() => faker.date.past().toISOString()),
   memoriesEnabled: true,
   memoriesEnabled: true,
   oauthId: '',
   oauthId: '',
+  avatarColor: UpdateUserDtoAvatarColorEnum.Primary,
 });
 });