aboutsummaryrefslogtreecommitdiff
path: root/src/components/mobile_post_status_button
diff options
context:
space:
mode:
authorEris <femmediscord@gmail.com>2021-06-14 17:54:40 +0000
committerEris <femmediscord@gmail.com>2021-06-14 17:54:40 +0000
commitadfe56a3a31b3c4a8c2c206c06bebf9c4af675d1 (patch)
tree552897a6324f91d193efca382a382ab9ad2bcb98 /src/components/mobile_post_status_button
parent2725a0c6398a876590b458ff1a8d6c2cc9af1d11 (diff)
New option: Always show floating New Post button
Diffstat (limited to 'src/components/mobile_post_status_button')
-rw-r--r--src/components/mobile_post_status_button/mobile_post_status_button.js3
-rw-r--r--src/components/mobile_post_status_button/mobile_post_status_button.vue4
2 files changed, 5 insertions, 2 deletions
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 @@
<div v-if="isLoggedIn">
<button
class="button-default new-status-button"
- :class="{ 'hidden': isHidden }"
+ :class="{ 'hidden': isHidden, 'always-show': isPersistent }"
@click="openPostForm"
>
<FAIcon icon="pen" />
@@ -47,7 +47,7 @@
}
@media all and (min-width: 801px) {
- .new-status-button {
+ .new-status-button:not(.always-show) {
display: none;
}
}