From fbbfbf18ecfae21f7969aaa18a152825c9b5de54 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 17 Jan 2023 21:18:27 -0800 Subject: [PATCH] folder: fixes for timeline view --- lib/Controller/ApiBase.php | 2 +- src/components/Timeline.vue | 2 +- src/components/top-matter/FolderTopMatter.vue | 28 ++++++++++++------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/lib/Controller/ApiBase.php b/lib/Controller/ApiBase.php index a0ea4bc1..a87410fd 100644 --- a/lib/Controller/ApiBase.php +++ b/lib/Controller/ApiBase.php @@ -222,7 +222,7 @@ class ApiBase extends Controller protected function isRecursive() { - return null === $this->request->getParam('folder') || "1" === $this->request->getParam('recursive'); + return null === $this->request->getParam('folder') || $this->request->getParam('recursive'); } protected function isArchive() diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index e8ee9ca9..ee270be2 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -637,7 +637,7 @@ export default defineComponent({ // Folder if (this.$route.name === "folders") { query.set("folder", utils.getFolderRoutePath(this.config_foldersPath)); - if(this.$route.query.recursive === "1") { + if (this.$route.query.recursive) { query.set("recursive", "1"); } } diff --git a/src/components/top-matter/FolderTopMatter.vue b/src/components/top-matter/FolderTopMatter.vue index efdff8b3..0c1b450e 100644 --- a/src/components/top-matter/FolderTopMatter.vue +++ b/src/components/top-matter/FolderTopMatter.vue @@ -17,13 +17,17 @@
- {{ t("memories", recursive ? "Show folders" : "Timeline") }} + {{ + recursive + ? t("memories", "Folder View") + : t("memories", "Timeline View") + }} ({ topMatter: null as TopMatterFolder | null, - recursive: false + recursive: false, }), watch: { @@ -109,13 +113,13 @@ export default defineComponent({ }; }), }; - this.recursive = this.$route.query.recursive === '1' + this.recursive = this.$route.query.recursive === "1"; } else { this.topMatter = null; this.recursive = false; } - } - } + }, + }, }); @@ -134,6 +138,10 @@ export default defineComponent({ @media (max-width: 768px) { margin-right: 10px; } + + :deep span { + cursor: pointer; + } } } - \ No newline at end of file +