aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/views/PanelLeft.vue
diff options
context:
space:
mode:
authorZero~Informatique2020-02-23 18:19:33 +0100
committerZero~Informatique2020-02-24 00:04:40 +0100
commitb252a96d47529749bb1d5e7a8d06fb7ce284b4ee (patch)
tree5ec03f0ed04a9af6c9d7738dd38e0b4f43f87599 /viewer/src/views/PanelLeft.vue
parent1915fd6e8b7b0c83a9a1b9254fd945f1cc0c7c19 (diff)
downloadldgallery-b252a96d47529749bb1d5e7a8d06fb7ce284b4ee.tar.gz
viewer: searching when viewing a picture will return to the parent directory
Code review fix
Diffstat (limited to 'viewer/src/views/PanelLeft.vue')
-rw-r--r--viewer/src/views/PanelLeft.vue4
1 files changed, 3 insertions, 1 deletions
diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index fd117a6..eb921b7 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -34,6 +34,7 @@
34<script lang="ts"> 34<script lang="ts">
35import { Component, Vue, Prop } from "vue-property-decorator"; 35import { Component, Vue, Prop } from "vue-property-decorator";
36import { Dictionary } from "vue-router/types/router"; 36import { Dictionary } from "vue-router/types/router";
37import Navigation from "../services/navigation";
37 38
38@Component 39@Component
39export default class PanelLeft extends Vue { 40export default class PanelLeft extends Vue {
@@ -43,7 +44,8 @@ export default class PanelLeft extends Vue {
43 } 44 }
44 45
45 search() { 46 search() {
46 this.$router.push({ query: this.serializeSearch() }).catch(err => { 47 const lastDirectory = Navigation.getLastDirectory(this.$galleryStore.currentItemPath);
48 this.$router.push({ path: lastDirectory.path, query: this.serializeSearch() }).catch(err => {
47 if (err.name !== "NavigationDuplicated") throw err; 49 if (err.name !== "NavigationDuplicated") throw err;
48 }); 50 });
49 } 51 }