refactor: use route check props for cluster view

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/767/head
Varun Patil 2023-07-29 10:12:47 -07:00
parent bedacf429a
commit 87c6c6f529
1 changed files with 5 additions and 6 deletions

View File

@ -81,7 +81,6 @@ export default defineComponent({
methods: { methods: {
async routeChange() { async routeChange() {
try { try {
const route = this.$route.name;
this.items = []; this.items = [];
this.loading++; this.loading++;
@ -89,13 +88,13 @@ export default defineComponent({
// @ts-ignore // @ts-ignore
await this.$refs.dtm?.refresh?.(); await this.$refs.dtm?.refresh?.();
if (route === 'albums') { if (this.routeIsAlbums) {
this.items = await dav.getAlbums(3, this.config.album_list_sort); this.items = await dav.getAlbums(3, this.config.album_list_sort);
} else if (route === 'tags') { } else if (this.routeIsTags) {
this.items = await dav.getTags(); this.items = await dav.getTags();
} else if (route === 'recognize' || route === 'facerecognition') { } else if (this.routeIsPeople) {
this.items = await dav.getFaceList(route); this.items = await dav.getFaceList(<any>this.$route.name);
} else if (route === 'places') { } else if (this.routeIsPlaces) {
this.items = await dav.getPlaces(); this.items = await dav.getPlaces();
} }
} finally { } finally {