folder: fixes for timeline view
parent
1b14fc4901
commit
fbbfbf18ec
|
@ -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()
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,11 @@
|
|||
:to="{ query: recursive ? {} : { recursive: '1' } }"
|
||||
close-after-click
|
||||
>
|
||||
{{ t("memories", recursive ? "Show folders" : "Timeline") }}
|
||||
{{
|
||||
recursive
|
||||
? t("memories", "Folder View")
|
||||
: t("memories", "Timeline View")
|
||||
}}
|
||||
<template #icon>
|
||||
<FoldersIcon v-if="recursive" :size="20" />
|
||||
<TimelineIcon v-else :size="20" />
|
||||
|
@ -72,12 +76,12 @@ export default defineComponent({
|
|||
HomeIcon,
|
||||
ShareIcon,
|
||||
TimelineIcon,
|
||||
FoldersIcon
|
||||
FoldersIcon,
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -134,6 +138,10 @@ export default defineComponent({
|
|||
@media (max-width: 768px) {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
:deep span {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue