diff --git a/docs/docs/CONFIGURATION.md b/docs/docs/CONFIGURATION.md index d7b25802..cdcbc61a 100644 --- a/docs/docs/CONFIGURATION.md +++ b/docs/docs/CONFIGURATION.md @@ -70,6 +70,9 @@ 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 36b087a5..60671135 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -173,8 +173,10 @@ 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 e8823693..705d0502 100644 --- a/src/components/features_panel/features_panel.js +++ b/src/components/features_panel/features_panel.js @@ -4,6 +4,7 @@ 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 b7c66fc7..a6ebfeaf 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -185,6 +185,9 @@ const PostStatusForm = { userDefaultScope () { return this.$store.state.users.currentUser.default_scope }, + showAllScopes () { + return !this.mergedConfig.minimalScopesMode + }, emojiUserSuggestor () { return suggestor({ emoji: [ @@ -226,6 +229,9 @@ const PostStatusForm = { isOverLengthLimit () { return this.hasStatusLengthLimit && (this.charactersLeft < 0) }, + minimalScopesMode () { + return this.$store.state.instance.minimalScopesMode + }, alwaysShowSubject () { return this.mergedConfig.alwaysShowSubjectInput }, @@ -651,8 +657,10 @@ const PostStatusForm = { if (this.copyMessageScope === 'direct') { return this.copyMessageScope } - if (this.copyMessageScope !== 'public' && this.$store.state.users.currentUser.default_scope !== 'private') { - return this.copyMessageScope + if (this.$store.getters.mergedConfig.scopeCopy) { + 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 02468f17..ce6df194 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -188,6 +188,7 @@ > +
  • + + {{ $t('settings.minimal_scopes_mode') }} + +
  • {{ $t('settings.sensitive_by_default') }} @@ -553,6 +559,14 @@ {{ $t('settings.sensitive_if_subject') }}
  • +
  • + + {{ $t('settings.scope_copy') }} + +
  • +
  • + + {{ $t('settings.minimal_scopes_mode') }} + +