From 3fa3237d763f7e00c3c2edfd5cb5905c0763de0b Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Sun, 13 Nov 2022 21:06:09 +0000 Subject: [PATCH] Prevent replying with a more open visibility than the parent post --- docs/docs/CONFIGURATION.md | 3 --- src/boot/after_store.js | 2 -- .../features_panel/features_panel.js | 1 - .../post_status_form/post_status_form.js | 12 ++-------- .../post_status_form/post_status_form.vue | 1 - .../scope_selector/scope_selector.js | 22 ++++++++++++++----- .../settings_modal/tabs/general_tab.vue | 22 ------------------- src/modules/config.js | 2 -- src/modules/instance.js | 2 -- static/config.json | 2 -- 10 files changed, 19 insertions(+), 50 deletions(-) diff --git a/docs/docs/CONFIGURATION.md b/docs/docs/CONFIGURATION.md index cdcbc61a..d7b25802 100644 --- a/docs/docs/CONFIGURATION.md +++ b/docs/docs/CONFIGURATION.md @@ -70,9 +70,6 @@ Default post formatting option (markdown/bbcode/plaintext/etc...) ### `redirectRootNoLogin`, `redirectRootLogin` These two settings should point to where FE should redirect visitor when they login/open up website root -### `scopeCopy` -Copy post scope (visibility) when replying to a post. Instance-default. - ### `sidebarRight` Change alignment of sidebar and panels to the right. Defaults to `false`. diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 986cd356..e63b313b 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -170,10 +170,8 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => { copyInstanceOption('redirectRootNoLogin') copyInstanceOption('redirectRootLogin') copyInstanceOption('showInstanceSpecificPanel') - copyInstanceOption('minimalScopesMode') copyInstanceOption('hideMutedPosts') copyInstanceOption('collapseMessageWithSubject') - copyInstanceOption('scopeCopy') copyInstanceOption('subjectLineBehavior') copyInstanceOption('postContentType') copyInstanceOption('alwaysShowSubjectInput') diff --git a/src/components/features_panel/features_panel.js b/src/components/features_panel/features_panel.js index 705d0502..e8823693 100644 --- a/src/components/features_panel/features_panel.js +++ b/src/components/features_panel/features_panel.js @@ -4,7 +4,6 @@ const FeaturesPanel = { computed: { whoToFollow: function () { return this.$store.state.instance.suggestionsEnabled }, mediaProxy: function () { return this.$store.state.instance.mediaProxyAvailable }, - minimalScopesMode: function () { return this.$store.state.instance.minimalScopesMode }, textlimit: function () { return this.$store.state.instance.textlimit }, uploadlimit: function () { return fileSizeFormatService.fileSizeFormat(this.$store.state.instance.uploadlimit) } } diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index cb3f8499..c9f492c3 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -181,9 +181,6 @@ const PostStatusForm = { userDefaultScope () { return this.$store.state.users.currentUser.default_scope }, - showAllScopes () { - return !this.mergedConfig.minimalScopesMode - }, emojiUserSuggestor () { return suggestor({ emoji: [ @@ -225,9 +222,6 @@ const PostStatusForm = { isOverLengthLimit () { return this.hasStatusLengthLimit && (this.charactersLeft < 0) }, - minimalScopesMode () { - return this.$store.state.instance.minimalScopesMode - }, alwaysShowSubject () { return this.mergedConfig.alwaysShowSubjectInput }, @@ -647,10 +641,8 @@ const PostStatusForm = { if (this.copyMessageScope === 'direct') { return this.copyMessageScope } - if (this.$store.getters.mergedConfig.scopeCopy) { - if (this.copyMessageScope !== 'public' && this.$store.state.users.currentUser.default_scope !== 'private') { - return this.copyMessageScope - } + if (this.copyMessageScope !== 'public' && this.$store.state.users.currentUser.default_scope !== 'private') { + return this.copyMessageScope } } return this.$store.state.users.currentUser.default_scope diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 6c505ddc..b6516585 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -188,7 +188,6 @@ > -
  • - - {{ $t('settings.minimal_scopes_mode') }} - -
  • {{ $t('settings.sensitive_by_default') }} @@ -559,14 +553,6 @@ {{ $t('settings.sensitive_if_subject') }}
  • -
  • - - {{ $t('settings.scope_copy') }} - -
  • -
  • - - {{ $t('settings.minimal_scopes_mode') }} - -