aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2021-06-18 02:27:57 +0300
committerHenry Jameson <me@hjkos.com>2021-06-18 02:27:57 +0300
commitb68fb7738ba0721183d4910aecce1ac741692734 (patch)
tree17ce3a83b8f107a6dafee90ba3c653e8baa3ca07 /src
parent1717a3aaf2fb104797669ecddbd4418dca10c0cd (diff)
parent338134acfb5dc70210b55e5e1736b6f90f9d250c (diff)
Merge remote-tracking branch 'origin/develop' into better-still-emoji
* origin/develop: Use proper setting name Use cleaner instance config check for shoutbox setting Make locale language cleaner Don't shorten shoutbox to SB Fix lint error Update CHANGELOG.md New option: Hide shoutbox
Diffstat (limited to 'src')
-rw-r--r--src/App.js3
-rw-r--r--src/App.vue2
-rw-r--r--src/components/settings_modal/tabs/general_tab.js1
-rw-r--r--src/components/settings_modal/tabs/general_tab.vue5
-rw-r--r--src/i18n/en.json1
-rw-r--r--src/modules/config.js1
6 files changed, 12 insertions, 1 deletions
diff --git a/src/App.js b/src/App.js
index fe4c30cb..362ac19d 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 },
+ hideShoutbox () {
+ return this.$store.getters.mergedConfig.hideShoutbox
+ },
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..c30f5e98 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -50,7 +50,7 @@
<media-modal />
</div>
<shout-panel
- v-if="currentUser && shout"
+ v-if="currentUser && shout && !hideShoutbox"
:floating="true"
class="floating-shout mobile-hidden"
/>
diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js
index 07fccf57..eeda61bf 100644
--- a/src/components/settings_modal/tabs/general_tab.js
+++ b/src/components/settings_modal/tabs/general_tab.js
@@ -50,6 +50,7 @@ const GeneralTab = {
return this.$store.state.instance.background &&
!this.$store.state.users.currentUser.background_image
},
+ instanceShoutboxPresent () { return this.$store.state.instance.shoutAvailable },
...SharedComputedObject()
}
}
diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue
index e62df290..71780e00 100644
--- a/src/components/settings_modal/tabs/general_tab.vue
+++ b/src/components/settings_modal/tabs/general_tab.vue
@@ -21,6 +21,11 @@
{{ $t('settings.hide_wallpaper') }}
</BooleanSetting>
</li>
+ <li v-if="instanceShoutboxPresent">
+ <BooleanSetting path="hideShoutbox">
+ {{ $t('settings.hide_shoutbox') }}
+ </BooleanSetting>
+ </li>
</ul>
</div>
<div class="setting-item">
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 2b253efb..86870447 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -350,6 +350,7 @@
"hide_all_muted_posts": "Hide muted posts",
"max_thumbnails": "Maximum amount of thumbnails per post",
"hide_isp": "Hide instance-specific panel",
+ "hide_shoutbox": "Hide instance shoutbox",
"right_sidebar": "Show sidebar on the right side",
"hide_wallpaper": "Hide instance wallpaper",
"preload_images": "Preload images",
diff --git a/src/modules/config.js b/src/modules/config.js
index ad9c8be5..db9d5ffb 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -21,6 +21,7 @@ export const defaultState = {
customThemeSource: undefined,
hideISP: false,
hideInstanceWallpaper: false,
+ hideShoutbox: false,
// bad name: actually hides posts of muted USERS
hideMutedPosts: undefined, // instance default
collapseMessageWithSubject: undefined, // instance default