From 3e1b40ce29feae8ab2b13da35eece15df8a7697c Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 10 Apr 2022 20:18:54 +0300 Subject: [PATCH] fix new post button not working day1, minor stylistic fixes --- src/App.js | 14 ++++++++++++++ src/App.scss | 6 ++++++ src/App.vue | 2 +- src/components/chat/chat.js | 1 + src/components/chat/chat.scss | 3 +++ .../mobile_post_status_button.js | 2 +- 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 75fa3a3c..39ef62e7 100644 --- a/src/App.js +++ b/src/App.js @@ -50,6 +50,16 @@ export default { window.removeEventListener('resize', this.updateMobileState) }, computed: { + classes () { + return [ + { + '-reverse': this.reverseLayout, + '-no-sticky-headers': this.noSticky, + '-has-new-post-button': this.newPostButtonShown + }, + '-' + this.layoutType + ] + }, currentUser () { return this.$store.state.users.currentUser }, userBackground () { return this.currentUser.background_image }, instanceBackground () { @@ -72,6 +82,10 @@ export default { !this.$store.getters.mergedConfig.hideISP && this.$store.state.instance.instanceSpecificPanelContent }, + newPostButtonShown () { + if (this.$route.name === 'chat' || this.$route.name === 'chats') return false + return this.$store.getters.mergedConfig.alwaysShowNewPostButton || this.layoutType === 'mobile' + }, showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel }, shoutboxPosition () { return this.$store.getters.mergedConfig.showNewPostButton || false diff --git a/src/App.scss b/src/App.scss index e65f3b2a..c8470c8a 100644 --- a/src/App.scss +++ b/src/App.scss @@ -222,6 +222,12 @@ nav { } } + &.-has-new-post-button { + .column { + padding-bottom: 20em; + } + } + &.-no-sticky-headers { .column { .panel-heading.-sticky { diff --git a/src/App.vue b/src/App.vue index b5f6e7d3..094a8ab9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -13,7 +13,7 @@