From e476318012bbe3ebec4aa18fde78833094c562d1 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Tue, 1 Oct 2019 09:15:27 +0000 Subject: [PATCH] allow the location of the instance specific panel to be configurable --- src/App.js | 4 ++++ src/App.vue | 2 +- src/boot/after_store.js | 1 + src/components/about/about.js | 7 ++++++- src/components/about/about.vue | 2 +- src/modules/instance.js | 1 + static/config.json | 3 ++- 7 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/App.js b/src/App.js index fe63b54c..3752e00e 100644 --- a/src/App.js +++ b/src/App.js @@ -96,6 +96,10 @@ export default { !this.$store.state.config.hideISP && this.$store.state.instance.instanceSpecificPanelContent }, + showInstanceSpecificPanelInSidebar () { + return this.showInstanceSpecificPanel && + this.$store.state.instance.showInstanceSpecificPanelInSidebar + }, showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel }, isMobileLayout () { return this.$store.state.interface.mobileLayout } }, diff --git a/src/App.vue b/src/App.vue index 8d7f6c79..f302226c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -76,7 +76,7 @@
- + diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 490ac4d0..d635efe9 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -99,6 +99,7 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => { copyInstanceOption('redirectRootNoLogin') copyInstanceOption('redirectRootLogin') copyInstanceOption('showInstanceSpecificPanel') + copyInstanceOption('showInstanceSpecificPanelInSidebar') copyInstanceOption('minimalScopesMode') copyInstanceOption('hideMutedPosts') copyInstanceOption('collapseMessageWithSubject') diff --git a/src/components/about/about.js b/src/components/about/about.js index ae1cb182..90bb697f 100644 --- a/src/components/about/about.js +++ b/src/components/about/about.js @@ -9,7 +9,12 @@ const About = { TermsOfServicePanel }, computed: { - showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel } + showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel }, + showInstanceSpecificPanel() { + return this.$store.state.instance.showInstanceSpecificPanel && + !this.$store.state.instance.showInstanceSpecificPanelInSidebar + }, + isMobileLayout () { return this.$store.state.interface.mobileLayout } } } diff --git a/src/components/about/about.vue b/src/components/about/about.vue index 62ae16ea..3d7a5775 100644 --- a/src/components/about/about.vue +++ b/src/components/about/about.vue @@ -1,6 +1,6 @@