feat(web): manual face tagging and deletion (#16062)

This commit is contained in:
Alex
2025-02-21 09:58:25 -06:00
committed by GitHub
parent 94c0e8253a
commit 007eaaceb9
35 changed files with 2054 additions and 106 deletions
+6 -2
View File
@@ -132,7 +132,7 @@ export type AssetPathEntity = Pick<AssetEntity, 'id' | 'originalPath' | 'isOffli
export interface GetByIdsRelations {
exifInfo?: boolean;
faces?: { person?: boolean };
faces?: { person?: boolean; withDeleted?: boolean };
files?: boolean;
library?: boolean;
owner?: boolean;
@@ -262,7 +262,11 @@ export class AssetRepository {
.selectAll('assets')
.where('assets.id', '=', anyUuid(ids))
.$if(!!exifInfo, withExif)
.$if(!!faces, (qb) => qb.select(faces?.person ? withFacesAndPeople : withFaces))
.$if(!!faces, (qb) =>
qb.select((eb) =>
faces?.person ? withFacesAndPeople(eb, faces.withDeleted) : withFaces(eb, faces?.withDeleted),
),
)
.$if(!!files, (qb) => qb.select(withFiles))
.$if(!!library, (qb) => qb.select(withLibrary))
.$if(!!owner, (qb) => qb.select(withOwner))