fix new post button not working day1, minor stylistic fixes

This commit is contained in:
Henry Jameson 2022-04-10 20:18:54 +03:00
parent 0f28c28760
commit 3e1b40ce29
6 changed files with 26 additions and 2 deletions

View File

@ -50,6 +50,16 @@ export default {
window.removeEventListener('resize', this.updateMobileState) window.removeEventListener('resize', this.updateMobileState)
}, },
computed: { 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 }, currentUser () { return this.$store.state.users.currentUser },
userBackground () { return this.currentUser.background_image }, userBackground () { return this.currentUser.background_image },
instanceBackground () { instanceBackground () {
@ -72,6 +82,10 @@ export default {
!this.$store.getters.mergedConfig.hideISP && !this.$store.getters.mergedConfig.hideISP &&
this.$store.state.instance.instanceSpecificPanelContent 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 }, showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
shoutboxPosition () { shoutboxPosition () {
return this.$store.getters.mergedConfig.showNewPostButton || false return this.$store.getters.mergedConfig.showNewPostButton || false

View File

@ -222,6 +222,12 @@ nav {
} }
} }
&.-has-new-post-button {
.column {
padding-bottom: 20em;
}
}
&.-no-sticky-headers { &.-no-sticky-headers {
.column { .column {
.panel-heading.-sticky { .panel-heading.-sticky {

View File

@ -13,7 +13,7 @@
<div <div
id="content" id="content"
class="app-layout container" class="app-layout container"
:class="[{ '-reverse': reverseLayout, '-no-sticky-headers': noSticky }, '-' + layoutType]" :class="classes"
> >
<div class="underlay"/> <div class="underlay"/>
<div id="sidebar" class="column -scrollable" :class="{ '-show-scrollbar': showScrollbars }"> <div id="sidebar" class="column -scrollable" :class="{ '-show-scrollbar': showScrollbars }">

View File

@ -91,6 +91,7 @@ const Chat = {
...mapState({ ...mapState({
backendInteractor: state => state.api.backendInteractor, backendInteractor: state => state.api.backendInteractor,
mastoUserSocketStatus: state => state.api.mastoUserSocketStatus, mastoUserSocketStatus: state => state.api.mastoUserSocketStatus,
mobileLayout: state => state.interface.layoutType === 'mobile',
currentUser: state => state.users.currentUser currentUser: state => state.users.currentUser
}) })
}, },

View File

@ -1,6 +1,9 @@
.chat-view { .chat-view {
display: flex; display: flex;
height: 100%; height: 100%;
// Stick the form to the top/bottom of screen
margin-bottom: calc(var(--___columnMargin) / -2);
margin-top: calc(var(--___columnMargin) / -2);
.chat-view-inner { .chat-view-inner {
height: auto; height: auto;

View File

@ -45,7 +45,7 @@ const MobilePostStatusButton = {
return this.autohideFloatingPostButton && (this.hidden || this.inputActive) return this.autohideFloatingPostButton && (this.hidden || this.inputActive)
}, },
isPersistent () { isPersistent () {
return !!this.$store.getters.mergedConfig.showNewPostButton return !!this.$store.getters.mergedConfig.alwaysShowNewPostButton
}, },
autohideFloatingPostButton () { autohideFloatingPostButton () {
return !!this.$store.getters.mergedConfig.autohideFloatingPostButton return !!this.$store.getters.mergedConfig.autohideFloatingPostButton