From a305ddc4ad38a9d92d5aa30738bec3cf26b6c5d5 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sun, 29 Oct 2023 11:03:20 -0700 Subject: [PATCH] folder: preserve query during navigation Signed-off-by: Varun Patil --- src/components/frame/Folder.vue | 8 ++------ src/components/top-matter/FolderTopMatter.vue | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/frame/Folder.vue b/src/components/frame/Folder.vue index cea8fbd9..8194b780 100644 --- a/src/components/frame/Folder.vue +++ b/src/components/frame/Folder.vue @@ -55,12 +55,8 @@ export default defineComponent({ path = path.split('/'); } - return { - name: this.$route.name, - params: { - path: [...path, this.data.name], - }, - }; + path = [...path, this.data.name]; // intentional copy + return { ...this.$route, params: { path } }; }, previews(): IPhoto[] { diff --git a/src/components/top-matter/FolderTopMatter.vue b/src/components/top-matter/FolderTopMatter.vue index 3404ecce..bbe9ec3f 100644 --- a/src/components/top-matter/FolderTopMatter.vue +++ b/src/components/top-matter/FolderTopMatter.vue @@ -1,7 +1,7 @@