diff --git a/lib/Controller/ApiBase.php b/lib/Controller/ApiBase.php
index 42d05c2e..a0ea4bc1 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');
+ return null === $this->request->getParam('folder') || "1" === $this->request->getParam('recursive');
}
protected function isArchive()
diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue
index 8972b387..e8ee9ca9 100644
--- a/src/components/Timeline.vue
+++ b/src/components/Timeline.vue
@@ -323,7 +323,10 @@ export default defineComponent({
methods: {
async routeChange(to: any, from?: any) {
- if (from?.path !== to.path) {
+ if (
+ from?.path !== to.path ||
+ JSON.stringify(from.query) !== JSON.stringify(to.query)
+ ) {
await this.refresh();
}
@@ -634,6 +637,9 @@ export default defineComponent({
// Folder
if (this.$route.name === "folders") {
query.set("folder", utils.getFolderRoutePath(this.config_foldersPath));
+ if(this.$route.query.recursive === "1") {
+ query.set("recursive", "1");
+ }
}
// Archive
diff --git a/src/components/top-matter/FolderTopMatter.vue b/src/components/top-matter/FolderTopMatter.vue
index 9308cd7f..efdff8b3 100644
--- a/src/components/top-matter/FolderTopMatter.vue
+++ b/src/components/top-matter/FolderTopMatter.vue
@@ -15,7 +15,17 @@
-
+
+
+ {{ t("memories", recursive ? "Show folders" : "Timeline") }}
+
+
+
+
+
import("@nextcloud/vue/dist/Components/NcBreadcrumb");
import NcActions from "@nextcloud/vue/dist/Components/NcActions";
import NcActionButton from "@nextcloud/vue/dist/Components/NcActionButton";
+import NcActionRouter from "@nextcloud/vue/dist/Components/NcActionRouter";
import FolderShareModal from "../modal/FolderShareModal.vue";
import HomeIcon from "vue-material-design-icons/Home.vue";
import ShareIcon from "vue-material-design-icons/ShareVariant.vue";
+import TimelineIcon from "vue-material-design-icons/ImageMultiple.vue";
+import FoldersIcon from "vue-material-design-icons/FolderMultiple.vue";
export default defineComponent({
name: "FolderTopMatter",
@@ -54,13 +67,17 @@ export default defineComponent({
NcBreadcrumb,
NcActions,
NcActionButton,
+ NcActionRouter,
FolderShareModal,
HomeIcon,
ShareIcon,
+ TimelineIcon,
+ FoldersIcon
},
data: () => ({
topMatter: null as TopMatterFolder | null,
+ recursive: false
}),
watch: {
@@ -92,11 +109,13 @@ export default defineComponent({
};
}),
};
+ this.recursive = this.$route.query.recursive === '1'
} else {
this.topMatter = null;
+ this.recursive = false;
}
- },
- },
+ }
+ }
});
@@ -105,6 +124,10 @@ export default defineComponent({
display: flex;
vertical-align: middle;
+ .breadcrumb {
+ min-width: 0;
+ }
+
.right-actions {
margin-right: 40px;
z-index: 50;
diff --git a/src/components/viewer/Viewer.vue b/src/components/viewer/Viewer.vue
index a0fa90e5..f256835d 100644
--- a/src/components/viewer/Viewer.vue
+++ b/src/components/viewer/Viewer.vue
@@ -814,6 +814,7 @@ export default defineComponent({
if (this.$route.hash?.startsWith("#v")) {
this.$router.replace({
hash: "",
+ query: this.$route.query,
});
}
}