mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: user avatar color (#17753)
This commit is contained in:
parent
460d594791
commit
ad272333db
30 changed files with 200 additions and 220 deletions
|
|
@ -9,6 +9,7 @@ import {
|
|||
Permission,
|
||||
SharedLinkType,
|
||||
SourceType,
|
||||
UserAvatarColor,
|
||||
UserStatus,
|
||||
} from 'src/enum';
|
||||
import { OnThisDayData, UserMetadataItem } from 'src/types';
|
||||
|
|
@ -122,6 +123,7 @@ export type User = {
|
|||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
avatarColor: UserAvatarColor | null;
|
||||
profileImagePath: string;
|
||||
profileChangedAt: Date;
|
||||
};
|
||||
|
|
@ -264,7 +266,15 @@ export type AssetFace = {
|
|||
person?: Person | null;
|
||||
};
|
||||
|
||||
const userColumns = ['id', 'name', 'email', 'profileImagePath', 'profileChangedAt'] as const;
|
||||
const userColumns = ['id', 'name', 'email', 'avatarColor', 'profileImagePath', 'profileChangedAt'] as const;
|
||||
const userWithPrefixColumns = [
|
||||
'users.id',
|
||||
'users.name',
|
||||
'users.email',
|
||||
'users.avatarColor',
|
||||
'users.profileImagePath',
|
||||
'users.profileChangedAt',
|
||||
] as const;
|
||||
|
||||
export const columns = {
|
||||
asset: [
|
||||
|
|
@ -306,7 +316,7 @@ export const columns = {
|
|||
'shared_links.password',
|
||||
],
|
||||
user: userColumns,
|
||||
userWithPrefix: ['users.id', 'users.name', 'users.email', 'users.profileImagePath', 'users.profileChangedAt'],
|
||||
userWithPrefix: userWithPrefixColumns,
|
||||
userAdmin: [
|
||||
...userColumns,
|
||||
'createdAt',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue