Metadata: Uses FaceRecognition clusters when the route if from this application.

pull/767/head
Matias De lellis 2023-08-07 21:15:57 -03:00
parent b956cbdb53
commit 4e98eddb53
4 changed files with 10 additions and 1 deletions

View File

@ -352,6 +352,9 @@ export default defineComponent({
},
people(): IFace[] {
if (this.routeIsFaceRecognition)
return this.baseInfo?.clusters?.facerecognition ?? [];
else
return this.baseInfo?.clusters?.recognize ?? [];
},
},
@ -367,6 +370,7 @@ export default defineComponent({
const clusters = [
this.config.albums_enabled ? 'albums' : null,
this.config.recognize_enabled ? 'recognize' : null,
this.config.facerecognition_enabled ? 'facerecognition' : null,
]
.filter((c) => c)
.join(',');

View File

@ -31,6 +31,9 @@ export default defineComponent({
routeIsRecognizeUnassigned(): boolean {
return this.routeIsRecognize && this.$route.params.name === constants.FACE_NULL;
},
routeIsFaceRecognition(): boolean {
return this.$route.name === 'facerecognition';
},
routeIsArchive(): boolean {
return this.$route.name === 'archive';
},

View File

@ -109,6 +109,7 @@ export interface IImageInfo {
clusters?: {
albums?: IAlbum[];
recognize?: IFace[];
facerecognition?: IFace[];
};
}

View File

@ -17,6 +17,7 @@ declare module 'vue' {
routeIsPeople: boolean;
routeIsRecognize: boolean;
routeIsRecognizeUnassigned: boolean;
routeIsFaceRecognition: boolean;
routeIsArchive: boolean;
routeIsPlaces: boolean;
routeIsMap: boolean;