logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 338134acfb5dc70210b55e5e1736b6f90f9d250c
parent 2725a0c6398a876590b458ff1a8d6c2cc9af1d11
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date:   Tue, 15 Jun 2021 21:32:20 +0000

Merge branch 'hideShoutbox' into 'develop'

New user option: Hide floating shoutbox

See merge request pleroma/pleroma-fe!1396

Diffstat:

MCHANGELOG.md1+
Msrc/App.js3+++
Msrc/App.vue2+-
Msrc/components/settings_modal/tabs/general_tab.js1+
Msrc/components/settings_modal/tabs/general_tab.vue5+++++
Msrc/i18n/en.json1+
Msrc/modules/config.js1+
7 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Added option to mark posts as sensitive by default - Added quick filters for notifications - Implemented user option to change sidebar position to the right side +- Implemented user option to hide floating shout panel ## [2.3.0] - 2021-03-01 diff --git 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 @@ -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 @@ -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 @@ -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 @@ -348,6 +348,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 @@ -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