diff --git a/src/components/Metadata.vue b/src/components/Metadata.vue index 69443953..83c0060c 100644 --- a/src/components/Metadata.vue +++ b/src/components/Metadata.vue @@ -352,7 +352,10 @@ export default defineComponent({ }, people(): IFace[] { - return this.baseInfo?.clusters?.recognize ?? []; + 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(','); diff --git a/src/mixins/GlobalMixin.ts b/src/mixins/GlobalMixin.ts index fe5a8194..30c4bb42 100644 --- a/src/mixins/GlobalMixin.ts +++ b/src/mixins/GlobalMixin.ts @@ -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'; }, diff --git a/src/types.ts b/src/types.ts index 432f453a..1ac9f1a1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -109,6 +109,7 @@ export interface IImageInfo { clusters?: { albums?: IAlbum[]; recognize?: IFace[]; + facerecognition?: IFace[]; }; } diff --git a/src/vue-globals.d.ts b/src/vue-globals.d.ts index b7d623cf..164fe487 100644 --- a/src/vue-globals.d.ts +++ b/src/vue-globals.d.ts @@ -17,6 +17,7 @@ declare module 'vue' { routeIsPeople: boolean; routeIsRecognize: boolean; routeIsRecognizeUnassigned: boolean; + routeIsFaceRecognition: boolean; routeIsArchive: boolean; routeIsPlaces: boolean; routeIsMap: boolean;