From adfe56a3a31b3c4a8c2c206c06bebf9c4af675d1 Mon Sep 17 00:00:00 2001 From: Eris Date: Mon, 14 Jun 2021 17:54:40 +0000 Subject: New option: Always show floating New Post button --- src/App.js | 3 +++ src/App.vue | 1 + .../mobile_post_status_button/mobile_post_status_button.js | 3 +++ .../mobile_post_status_button/mobile_post_status_button.vue | 4 ++-- src/components/settings_modal/tabs/general_tab.vue | 5 +++++ src/components/shout_panel/shout_panel.vue | 9 ++++++++- src/i18n/en.json | 1 + src/modules/config.js | 1 + 8 files changed, 24 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/App.js b/src/App.js index fe4c30cb..e7ea3851 100644 --- a/src/App.js +++ b/src/App.js @@ -73,6 +73,9 @@ export default { this.$store.state.instance.instanceSpecificPanelContent }, showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel }, + shoutboxPosition () { + return this.$store.getters.mergedConfig.showNewPostButton || false + }, isMobileLayout () { return this.$store.state.interface.mobileLayout }, privateMode () { return this.$store.state.instance.private }, sidebarAlign () { diff --git a/src/App.vue b/src/App.vue index 6c582c03..6b867498 100644 --- a/src/App.vue +++ b/src/App.vue @@ -53,6 +53,7 @@ v-if="currentUser && shout" :floating="true" class="floating-shout mobile-hidden" + :class="{ 'left': shoutboxPosition }" /> diff --git a/src/components/mobile_post_status_button/mobile_post_status_button.js b/src/components/mobile_post_status_button/mobile_post_status_button.js index 366ea89c..d27fb3b8 100644 --- a/src/components/mobile_post_status_button/mobile_post_status_button.js +++ b/src/components/mobile_post_status_button/mobile_post_status_button.js @@ -44,6 +44,9 @@ const MobilePostStatusButton = { return this.autohideFloatingPostButton && (this.hidden || this.inputActive) }, + isPersistent () { + return !!this.$store.getters.mergedConfig.showNewPostButton + }, autohideFloatingPostButton () { return !!this.$store.getters.mergedConfig.autohideFloatingPostButton } diff --git a/src/components/mobile_post_status_button/mobile_post_status_button.vue b/src/components/mobile_post_status_button/mobile_post_status_button.vue index 767f8244..37becf4c 100644 --- a/src/components/mobile_post_status_button/mobile_post_status_button.vue +++ b/src/components/mobile_post_status_button/mobile_post_status_button.vue @@ -2,7 +2,7 @@