refactor: user avatar color (#17753)

This commit is contained in:
Jason Rasmussen 2025-04-28 09:54:51 -04:00 committed by GitHub
parent 460d594791
commit ad272333db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 200 additions and 220 deletions

View file

@ -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',