modal: fix album/face edit routes

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-05-06 21:36:04 -07:00
parent 2641a7619b
commit 5668e54a55
2 changed files with 8 additions and 2 deletions

View File

@ -66,7 +66,13 @@ export default defineComponent({
if (!this.album || album.basename !== this.album.basename) { if (!this.album || album.basename !== this.album.basename) {
const user = album.filename.split('/')[2]; const user = album.filename.split('/')[2];
const name = album.basename; const name = album.basename;
this.$router.push({ name: 'albums', params: { user, name } }); const route = { name: 'albums', params: { user, name } };
if (!this.album) {
this.$router.push(route);
} else {
this.$router.replace(route);
}
} }
this.close(); this.close();
}, },

View File

@ -93,7 +93,7 @@ export default defineComponent({
} else { } else {
await dav.faceRecognitionRenamePerson(this.oldName, this.name); await dav.faceRecognitionRenamePerson(this.oldName, this.name);
} }
this.$router.push({ this.$router.replace({
name: this.$route.name as string, name: this.$route.name as string,
params: { user: this.user, name: this.name }, params: { user: this.user, name: this.name },
}); });