mirror of
https://github.com/immich-app/immich.git
synced 2025-11-25 18:10:48 +09:00
refactor: user avatar color (#17753)
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user