diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index d6972737..1911ab23 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -4,6 +4,7 @@ import get from 'lodash/get'
import TabSwitcher from '../tab_switcher/tab_switcher.js'
import ImageCropper from '../image_cropper/image_cropper.vue'
import StyleSwitcher from '../style_switcher/style_switcher.vue'
+import ScopeSelector from '../scope_selector/scope_selector.vue'
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
import BlockCard from '../block_card/block_card.vue'
import MuteCard from '../mute_card/mute_card.vue'
@@ -66,6 +67,7 @@ const UserSettings = {
},
components: {
StyleSwitcher,
+ ScopeSelector,
TabSwitcher,
ImageCropper,
BlockList,
@@ -78,8 +80,8 @@ const UserSettings = {
pleromaBackend () {
return this.$store.state.instance.pleromaBackend
},
- scopeOptionsEnabled () {
- return this.$store.state.instance.scopeOptionsEnabled
+ scopeOptionsMinimal () {
+ return this.$store.state.instance.scopeOptionsMinimal
},
vis () {
return {
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index a1123638..7bd391ba 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -29,13 +29,13 @@
-
+
-
-
-
-
+
diff --git a/src/i18n/en.json b/src/i18n/en.json
index c5a4a90d..fb8fcfcc 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -211,6 +211,7 @@
"saving_ok": "Settings saved",
"security_tab": "Security",
"scope_copy": "Copy scope when replying (DMs are always copied)",
+ "minimal_scopes_mode": "Minimize post scope selection options",
"set_new_avatar": "Set new avatar",
"set_new_profile_background": "Set new profile background",
"set_new_profile_banner": "Set new profile banner",
diff --git a/src/i18n/ru.json b/src/i18n/ru.json
index 6799cc96..89aa43f4 100644
--- a/src/i18n/ru.json
+++ b/src/i18n/ru.json
@@ -111,6 +111,8 @@
"import_theme": "Загрузить Тему",
"inputRadius": "Поля ввода",
"checkboxRadius": "Чекбоксы",
+ "instance_default": "(по умолчанию: {value})",
+ "instance_default_simple": "(по умолчанию)",
"interface": "Интерфейс",
"interfaceLanguage": "Язык интерфейса",
"limited_availability": "Не доступно в вашем браузере",
@@ -149,7 +151,11 @@
"reply_visibility_all": "Показывать все ответы",
"reply_visibility_following": "Показывать только ответы мне и тех на кого я подписан",
"reply_visibility_self": "Показывать только ответы мне",
+ "saving_err": "Не удалось сохранить настройки",
+ "saving_ok": "Сохранено",
"security_tab": "Безопасность",
+ "scope_copy": "Копировать видимость поста при ответе (всегда включено для Личных Сообщений)",
+ "minimal_scopes_mode": "Минимизировать набор опций видимости поста",
"set_new_avatar": "Загрузить новый аватар",
"set_new_profile_background": "Загрузить новый фон профиля",
"set_new_profile_banner": "Загрузить новый баннер профиля",
@@ -164,6 +170,10 @@
"theme_help_v2_2": "Под некоторыми полями ввода это идикаторы контрастности, наведите на них мышью чтобы узнать больше. Приспользовании прозрачности контраст расчитывается для наихудшего варианта.",
"tooltipRadius": "Всплывающие подсказки/уведомления",
"user_settings": "Настройки пользователя",
+ "values": {
+ "false": "нет",
+ "true": "да"
+ },
"style": {
"switcher": {
"keep_color": "Оставить цвета",
diff --git a/src/modules/config.js b/src/modules/config.js
index 1c30c203..6d8aad35 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -32,7 +32,8 @@ const defaultState = {
scopeCopy: undefined, // instance default
subjectLineBehavior: undefined, // instance default
alwaysShowSubjectInput: undefined, // instance default
- postContentType: undefined // instance default
+ postContentType: undefined, // instance default
+ minimalScopesMode: undefined // instance default
}
const config = {
diff --git a/src/modules/instance.js b/src/modules/instance.js
index c31d02b9..7b67890f 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -15,7 +15,6 @@ const defaultState = {
redirectRootNoLogin: '/main/all',
redirectRootLogin: '/main/friends',
showInstanceSpecificPanel: false,
- scopeOptionsEnabled: true,
formattingOptionsEnabled: false,
alwaysShowSubjectInput: true,
collapseMessageWithSubject: false,
@@ -31,6 +30,7 @@ const defaultState = {
vapidPublicKey: undefined,
noAttachmentLinks: false,
showFeaturesPanel: true,
+ minimalScopesMode: false,
// Nasty stuff
pleromaBackend: true,
diff --git a/static/config.json b/static/config.json
index 533a5b08..b436daae 100644
--- a/static/config.json
+++ b/static/config.json
@@ -21,5 +21,6 @@
"webPushNotifications": false,
"noAttachmentLinks": false,
"nsfwCensorImage": "",
- "showFeaturesPanel": true
+ "showFeaturesPanel": true,
+ "minimalScopesMode": false
}
From bf927122df94853593a000ae873e8c840674258f Mon Sep 17 00:00:00 2001
From: Henry Jameson
Date: Sat, 30 Mar 2019 12:25:23 +0200
Subject: [PATCH 2/7] Review
---
BREAKING_CHANGES.md | 6 ++++++
src/components/post_status_form/post_status_form.vue | 1 -
src/components/scope_selector/scope_selector.js | 3 +--
3 files changed, 7 insertions(+), 3 deletions(-)
create mode 100644 BREAKING_CHANGES.md
diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md
new file mode 100644
index 00000000..915aa74c
--- /dev/null
+++ b/BREAKING_CHANGES.md
@@ -0,0 +1,6 @@
+# v1.0
+## Removed features/radically changed behavior
+* As of !633, `scopeOptions` is no longer available and instead is changed for `scopeOptionsMinimal` (default: `false`)
+Reasoning is that scopeOptions option originally existed mostly as a backwards-compatibility with GNU Social which only had `public` scope available and using scope selector would''t work. Since at some point we dropped GNU Social support, this option was mostly a nuisance (being default `false`'), however some people think scopes are an annoyance to a certain degree and want as less of that feature as possible.
+Solution - to only show minimal set among: *Direct*, *User default* and *Scope of post replying to*. This also makes it impossible to reply to a DM with a non-DM post from UI.
+*This setting is admin-default, user-configurable. Admin can choose different default for their instance but user can override it.*
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index b3d731cd..8beb73a9 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -46,7 +46,6 @@
Date: Sat, 30 Mar 2019 12:26:53 +0200
Subject: [PATCH 3/7] fix formatting
---
BREAKING_CHANGES.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md
index 915aa74c..b1d9ea13 100644
--- a/BREAKING_CHANGES.md
+++ b/BREAKING_CHANGES.md
@@ -1,6 +1,9 @@
# v1.0
## Removed features/radically changed behavior
-* As of !633, `scopeOptions` is no longer available and instead is changed for `scopeOptionsMinimal` (default: `false`)
+As of !633, `scopeOptions` is no longer available and instead is changed for `scopeOptionsMinimal` (default: `false`)
+
Reasoning is that scopeOptions option originally existed mostly as a backwards-compatibility with GNU Social which only had `public` scope available and using scope selector would''t work. Since at some point we dropped GNU Social support, this option was mostly a nuisance (being default `false`'), however some people think scopes are an annoyance to a certain degree and want as less of that feature as possible.
+
Solution - to only show minimal set among: *Direct*, *User default* and *Scope of post replying to*. This also makes it impossible to reply to a DM with a non-DM post from UI.
+
*This setting is admin-default, user-configurable. Admin can choose different default for their instance but user can override it.*
From e89a62200532a4d61de35d73299c33555aad8bed Mon Sep 17 00:00:00 2001
From: Henry Jameson
Date: Sat, 30 Mar 2019 12:29:28 +0200
Subject: [PATCH 4/7] fix formatting
---
BREAKING_CHANGES.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md
index b1d9ea13..45f7c74b 100644
--- a/BREAKING_CHANGES.md
+++ b/BREAKING_CHANGES.md
@@ -1,5 +1,6 @@
# v1.0
## Removed features/radically changed behavior
+### scopeOptionsMinimal
As of !633, `scopeOptions` is no longer available and instead is changed for `scopeOptionsMinimal` (default: `false`)
Reasoning is that scopeOptions option originally existed mostly as a backwards-compatibility with GNU Social which only had `public` scope available and using scope selector would''t work. Since at some point we dropped GNU Social support, this option was mostly a nuisance (being default `false`'), however some people think scopes are an annoyance to a certain degree and want as less of that feature as possible.
From 995daf70b731f33c95ca654ee9daccb399d6c92d Mon Sep 17 00:00:00 2001
From: Henry Jameson
Date: Sat, 30 Mar 2019 12:34:13 +0200
Subject: [PATCH 5/7] fix lint
---
src/components/scope_selector/scope_selector.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/scope_selector/scope_selector.js b/src/components/scope_selector/scope_selector.js
index 4693d066..8a42ee7b 100644
--- a/src/components/scope_selector/scope_selector.js
+++ b/src/components/scope_selector/scope_selector.js
@@ -42,7 +42,7 @@ const ScopeSelector = {
this.currentScope === scope ||
this.originalScope === scope ||
this.userDefault === scope ||
- 'direct' === scope
+ scope === 'direct'
},
changeVis (scope) {
this.currentScope = scope
From 4dc64438e929169770347c8868daa1e1c907290e Mon Sep 17 00:00:00 2001
From: Henry Jameson
Date: Sat, 30 Mar 2019 12:41:42 +0200
Subject: [PATCH 6/7] aaaaggghh
---
BREAKING_CHANGES.md | 4 ++--
src/components/features_panel/features_panel.js | 2 +-
src/components/post_status_form/post_status_form.js | 4 ++--
src/components/user_settings/user_settings.js | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md
index 45f7c74b..924c38da 100644
--- a/BREAKING_CHANGES.md
+++ b/BREAKING_CHANGES.md
@@ -1,7 +1,7 @@
# v1.0
## Removed features/radically changed behavior
-### scopeOptionsMinimal
-As of !633, `scopeOptions` is no longer available and instead is changed for `scopeOptionsMinimal` (default: `false`)
+### minimalScopesMode
+As of !633, `scopeOptions` is no longer available and instead is changed for `minimalScopesMode` (default: `false`)
Reasoning is that scopeOptions option originally existed mostly as a backwards-compatibility with GNU Social which only had `public` scope available and using scope selector would''t work. Since at some point we dropped GNU Social support, this option was mostly a nuisance (being default `false`'), however some people think scopes are an annoyance to a certain degree and want as less of that feature as possible.
diff --git a/src/components/features_panel/features_panel.js b/src/components/features_panel/features_panel.js
index 0a7234cc..5f0b7b25 100644
--- a/src/components/features_panel/features_panel.js
+++ b/src/components/features_panel/features_panel.js
@@ -6,7 +6,7 @@ const FeaturesPanel = {
gopher: function () { return this.$store.state.instance.gopherAvailable },
whoToFollow: function () { return this.$store.state.instance.suggestionsEnabled },
mediaProxy: function () { return this.$store.state.instance.mediaProxyAvailable },
- scopeOptionsMinimal: function () { return this.$store.state.instance.scopeOptionsMinimal },
+ minimalScopesMode: function () { return this.$store.state.instance.minimalScopesMode },
textlimit: function () { return this.$store.state.instance.textlimit }
}
}
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index 499cbbfb..40e2610e 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -162,8 +162,8 @@ const PostStatusForm = {
isOverLengthLimit () {
return this.hasStatusLengthLimit && (this.charactersLeft < 0)
},
- scopeOptionsMinimal () {
- return this.$store.state.instance.scopeOptionsMinimal
+ minimalScopesMode () {
+ return this.$store.state.instance.minimalScopesMode
},
alwaysShowSubject () {
if (typeof this.$store.state.config.alwaysShowSubjectInput !== 'undefined') {
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js
index 4b277b6c..b6a0479d 100644
--- a/src/components/user_settings/user_settings.js
+++ b/src/components/user_settings/user_settings.js
@@ -82,8 +82,8 @@ const UserSettings = {
pleromaBackend () {
return this.$store.state.instance.pleromaBackend
},
- scopeOptionsMinimal () {
- return this.$store.state.instance.scopeOptionsMinimal
+ minimalScopesMode () {
+ return this.$store.state.instance.minimalScopesMode
},
vis () {
return {
From 07927328226f7643d6df1762031f3147d121798e Mon Sep 17 00:00:00 2001
From: Henry Jameson
Date: Sat, 30 Mar 2019 12:42:42 +0200
Subject: [PATCH 7/7] final touches
---
README.md | 2 +-
src/components/features_panel/features_panel.vue | 2 +-
static/config.json | 1 -
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 80938c45..889f0837 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@ FE Build process also leaves current commit hash in global variable `___pleromaf
# Configuration
-Edit config.json for configuration. scopeOptionsEnabled gives you input fields for CWs and the scope settings.
+Edit config.json for configuration.
## Options
diff --git a/src/components/features_panel/features_panel.vue b/src/components/features_panel/features_panel.vue
index 445143e9..7a263e01 100644
--- a/src/components/features_panel/features_panel.vue
+++ b/src/components/features_panel/features_panel.vue
@@ -12,7 +12,7 @@