From 0c1014524232907925bf5fa59079dd06d0ef0472 Mon Sep 17 00:00:00 2001 From: Eris Date: Mon, 14 Jun 2021 19:42:56 +0000 Subject: [PATCH 1/7] New option: Hide shoutbox --- src/App.js | 3 +++ src/App.vue | 2 +- src/components/settings_modal/tabs/general_tab.js | 1 + src/components/settings_modal/tabs/general_tab.vue | 5 +++++ src/i18n/en.json | 1 + src/modules/config.js | 1 + 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index fe4c30cb25..8d9ec8c7ce 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 }, + hideSB () { + 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 6c582c0342..39decde9e1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -50,7 +50,7 @@ diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js index 07fccf57cf..0e838e599f 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 }, + shout () { return this.$store.state.shout.channel.state === 'joined' }, ...SharedComputedObject() } } diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index bdb29edf0f..3a9af1ea96 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') }} +
  • + + {{ $t('settings.hide_shoutbox') }} {{ $t('shoutbox.title') }} + +
  • diff --git a/src/i18n/en.json b/src/i18n/en.json index aa440ac1b9..79dcb91965 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -349,6 +349,7 @@ "max_thumbnails": "Maximum amount of thumbnails per post", "hide_isp": "Hide instance-specific panel", "right_sidebar": "Show sidebar on the right side", + "hide_shoutbox": "Hide ", "hide_wallpaper": "Hide instance wallpaper", "preload_images": "Preload images", "use_one_click_nsfw": "Open NSFW attachments with just one click", diff --git a/src/modules/config.js b/src/modules/config.js index 0f59675056..bdab3f4dbb 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 From 1fcccd7570d2ece6c6e60af28662db7a697a0730 Mon Sep 17 00:00:00 2001 From: Eris Date: Mon, 14 Jun 2021 19:43:47 +0000 Subject: [PATCH 2/7] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 905d9f65be..ec9cfde89b 100644 --- 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 From 1668315bf8c454a995a968dc034d9e51715987c5 Mon Sep 17 00:00:00 2001 From: Eris Date: Mon, 14 Jun 2021 20:02:13 +0000 Subject: [PATCH 3/7] Fix lint error --- src/components/settings_modal/tabs/general_tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js index 0e838e599f..be0fc7682c 100644 --- a/src/components/settings_modal/tabs/general_tab.js +++ b/src/components/settings_modal/tabs/general_tab.js @@ -50,7 +50,7 @@ const GeneralTab = { return this.$store.state.instance.background && !this.$store.state.users.currentUser.background_image }, - shout () { return this.$store.state.shout.channel.state === 'joined' }, + shout () { return this.$store.state.shout.channel.state === 'joined' }, ...SharedComputedObject() } } From cbccea054698916a083b7906898b50039cdd411c Mon Sep 17 00:00:00 2001 From: Eris Date: Mon, 14 Jun 2021 20:33:51 +0000 Subject: [PATCH 4/7] Don't shorten shoutbox to SB --- src/App.js | 2 +- src/App.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 8d9ec8c7ce..362ac19d54 100644 --- a/src/App.js +++ b/src/App.js @@ -73,7 +73,7 @@ export default { this.$store.state.instance.instanceSpecificPanelContent }, showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel }, - hideSB () { + hideShoutbox () { return this.$store.getters.mergedConfig.hideShoutbox }, isMobileLayout () { return this.$store.state.interface.mobileLayout }, diff --git a/src/App.vue b/src/App.vue index 39decde9e1..c30f5e988a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -50,7 +50,7 @@
    From 5047663c513841ea708f58e672bf193a55a96a82 Mon Sep 17 00:00:00 2001 From: Eris Date: Tue, 15 Jun 2021 00:25:09 +0000 Subject: [PATCH 5/7] Make locale language cleaner --- src/components/settings_modal/tabs/general_tab.vue | 2 +- src/i18n/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index 3a9af1ea96..8c255dd34a 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -23,7 +23,7 @@
  • - {{ $t('settings.hide_shoutbox') }} {{ $t('shoutbox.title') }} + {{ $t('general.hide') }} {{ $t('shoutbox.title') }}
  • diff --git a/src/i18n/en.json b/src/i18n/en.json index 79dcb91965..247b716762 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -75,6 +75,7 @@ "confirm": "Confirm", "verify": "Verify", "close": "Close", + "hide": "Hide", "peek": "Peek", "role": { "admin": "Admin", @@ -349,7 +350,6 @@ "max_thumbnails": "Maximum amount of thumbnails per post", "hide_isp": "Hide instance-specific panel", "right_sidebar": "Show sidebar on the right side", - "hide_shoutbox": "Hide ", "hide_wallpaper": "Hide instance wallpaper", "preload_images": "Preload images", "use_one_click_nsfw": "Open NSFW attachments with just one click", From 7e3393b5a2eda7f696781853123de8df965ffbf2 Mon Sep 17 00:00:00 2001 From: Eris Date: Tue, 15 Jun 2021 00:59:36 +0000 Subject: [PATCH 6/7] Use cleaner instance config check for shoutbox setting --- src/components/settings_modal/tabs/general_tab.js | 2 +- src/components/settings_modal/tabs/general_tab.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js index be0fc7682c..eeda61bf7c 100644 --- a/src/components/settings_modal/tabs/general_tab.js +++ b/src/components/settings_modal/tabs/general_tab.js @@ -50,7 +50,7 @@ const GeneralTab = { return this.$store.state.instance.background && !this.$store.state.users.currentUser.background_image }, - shout () { return this.$store.state.shout.channel.state === 'joined' }, + 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 8c255dd34a..84f8ef8d07 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -21,7 +21,7 @@ {{ $t('settings.hide_wallpaper') }} -
  • +
  • {{ $t('general.hide') }} {{ $t('shoutbox.title') }} From d7a53aec613c6da7f67906b16f052ec4e7441960 Mon Sep 17 00:00:00 2001 From: Eris Date: Tue, 15 Jun 2021 18:09:00 +0000 Subject: [PATCH 7/7] Use proper setting name --- src/components/settings_modal/tabs/general_tab.vue | 2 +- src/i18n/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue index 84f8ef8d07..d3e71b31e0 100644 --- a/src/components/settings_modal/tabs/general_tab.vue +++ b/src/components/settings_modal/tabs/general_tab.vue @@ -23,7 +23,7 @@
  • - {{ $t('general.hide') }} {{ $t('shoutbox.title') }} + {{ $t('settings.hide_shoutbox') }}
  • diff --git a/src/i18n/en.json b/src/i18n/en.json index 247b716762..6511019c49 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -75,7 +75,6 @@ "confirm": "Confirm", "verify": "Verify", "close": "Close", - "hide": "Hide", "peek": "Peek", "role": { "admin": "Admin", @@ -349,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",