fix: replace first and last name with single field (#4915)

This commit is contained in:
Brian Austin 2023-11-11 20:03:32 -05:00 committed by GitHub
parent 413ab2c538
commit 7fca0d8da5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
98 changed files with 567 additions and 1147 deletions

View file

@ -9,8 +9,7 @@
interface User {
id: string;
firstName: string;
lastName: string;
name: string;
email: string;
profileImagePath: string;
}
@ -51,7 +50,7 @@
$: colorClass = colorClasses[autoColor ? getUserColor() : color];
$: sizeClass = sizeClasses[size];
$: title = `${user.firstName} ${user.lastName} (${user.email})`;
$: title = `${user.name} (${user.email})`;
$: interactiveClass = interactive
? 'border-2 border-immich-primary hover:border-immich-dark-primary dark:hover:border-immich-primary dark:border-immich-dark-primary transition-colors'
: '';
@ -82,7 +81,7 @@
class:font-medium={!autoColor}
class:font-semibold={autoColor}
>
{((user.firstName[0] || '') + (user.lastName[0] || '')).toUpperCase()}
{(user.name[0] || '').toUpperCase()}
</span>
{/if}
</figure>