diff --git a/src/CollectivesApp.vue b/src/CollectivesApp.vue index fbb644143..3baa8f6ec 100644 --- a/src/CollectivesApp.vue +++ b/src/CollectivesApp.vue @@ -87,7 +87,7 @@ export default { this.rootStore.pageParam = val.params.page this.rootStore.pageId = val.params.pageId ? parseInt(val.params.pageId) : null this.rootStore.shareTokenParam = val.params.token - this.rootStore.fileIdQuery = val.query.fileId + this.rootStore.fileIdQuery = val.query.fileId ? parseInt(val.query.fileId) : '' }, immediate: true, diff --git a/src/components/CollectiveContainer.vue b/src/components/CollectiveContainer.vue index e426f2164..d466c0184 100644 --- a/src/components/CollectiveContainer.vue +++ b/src/components/CollectiveContainer.vue @@ -90,11 +90,10 @@ export default { ]), ...mapState(usePagesStore, [ - 'currentFileIdPage', 'currentPage', + 'currentPageId', 'currentPagePath', 'isLandingPage', - 'pagePath', 'pagesLoaded', ]), @@ -120,17 +119,11 @@ export default { } }, - 'currentPage.id': function() { + currentPageId: function() { this.selectVersion(null) this.slugUrl() }, - notFound: function(current) { - if (current && this.currentFileIdPage) { - this.$router.replace(this.pagePath(this.currentFileIdPage) + document.location.hash) - } - }, - networkOnline: function(val) { if (val && this.loadPending) { this.getShares() diff --git a/src/components/CollectivePrint.vue b/src/components/CollectivePrint.vue index b3f01c3b4..bafd02001 100644 --- a/src/components/CollectivePrint.vue +++ b/src/components/CollectivePrint.vue @@ -119,7 +119,7 @@ export default { }, async mounted() { - await this.getPages() + await this.getCurrentPages() .catch(displayError('Could not fetch pages')) this.loadPages.total = this.pagesTreeWalk().length }, @@ -127,7 +127,7 @@ export default { methods: { t, - ...mapActions(usePagesStore, ['getPages']), + ...mapActions(usePagesStore, ['getCurrentPages']), ready(pageId) { if (this.waitingFor.indexOf(pageId) >= 0) { diff --git a/src/components/Page/LandingPageWidgets.vue b/src/components/Page/LandingPageWidgets.vue index 6abc4afb3..e1309a1be 100644 --- a/src/components/Page/LandingPageWidgets.vue +++ b/src/components/Page/LandingPageWidgets.vue @@ -36,10 +36,10 @@ export default { computed: { ...mapState(useRootStore, ['isPublic']), - ...mapState(usePagesStore, ['pages']), + ...mapState(usePagesStore, ['currentPages']), showRecentPages() { - return this.pages.length > 3 + return this.currentPages.length > 3 }, }, } diff --git a/src/components/Page/PageActionMenu.vue b/src/components/Page/PageActionMenu.vue index aa7a70c0a..7506799c3 100644 --- a/src/components/Page/PageActionMenu.vue +++ b/src/components/Page/PageActionMenu.vue @@ -47,7 +47,7 @@ + @click="toggleOutline(currentPageId)"> @@ -118,9 +118,9 @@