diff --git a/src/components/settings_modal/helpers/boolean_setting.vue b/src/components/settings_modal/helpers/boolean_setting.vue
new file mode 100644
index 00000000..b600b63b
--- /dev/null
+++ b/src/components/settings_modal/helpers/boolean_setting.vue
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
diff --git a/src/components/settings_modal/helpers/modified_indicator.vue b/src/components/settings_modal/helpers/modified_indicator.vue
new file mode 100644
index 00000000..b75a2811
--- /dev/null
+++ b/src/components/settings_modal/helpers/modified_indicator.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+ {{ $t('settings.setting_changed') }}
+
+
+
+
+
+
+
+
diff --git a/src/components/settings_modal/helpers/shared_computed_object.js b/src/components/settings_modal/helpers/shared_computed_object.js
index 86703697..2c833c0c 100644
--- a/src/components/settings_modal/helpers/shared_computed_object.js
+++ b/src/components/settings_modal/helpers/shared_computed_object.js
@@ -1,29 +1,15 @@
-import {
- instanceDefaultProperties,
- multiChoiceProperties,
- defaultState as configDefaultState
-} from 'src/modules/config.js'
+import { defaultState as configDefaultState } from 'src/modules/config.js'
const SharedComputedObject = () => ({
user () {
return this.$store.state.users.currentUser
},
- // Getting localized values for instance-default properties
- ...instanceDefaultProperties
- .filter(key => multiChoiceProperties.includes(key))
+ // Getting values for default properties
+ ...Object.keys(configDefaultState)
.map(key => [
key + 'DefaultValue',
function () {
- return this.$store.getters.instanceDefaultConfig[key]
- }
- ])
- .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}),
- ...instanceDefaultProperties
- .filter(key => !multiChoiceProperties.includes(key))
- .map(key => [
- key + 'LocalizedValue',
- function () {
- return this.$t('settings.values.' + this.$store.getters.instanceDefaultConfig[key])
+ return this.$store.getters.defaultConfig[key]
}
])
.reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}),
diff --git a/src/components/settings_modal/tabs/filtering_tab.js b/src/components/settings_modal/tabs/filtering_tab.js
index 5f38a5ae..6e95f7af 100644
--- a/src/components/settings_modal/tabs/filtering_tab.js
+++ b/src/components/settings_modal/tabs/filtering_tab.js
@@ -1,5 +1,5 @@
import { filter, trim } from 'lodash'
-import Checkbox from 'src/components/checkbox/checkbox.vue'
+import BooleanSetting from '../helpers/boolean_setting.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
import { library } from '@fortawesome/fontawesome-svg-core'
@@ -18,7 +18,7 @@ const FilteringTab = {
}
},
components: {
- Checkbox
+ BooleanSetting
},
computed: {
...SharedComputedObject(),
diff --git a/src/components/settings_modal/tabs/filtering_tab.vue b/src/components/settings_modal/tabs/filtering_tab.vue
index 8f850c8b..18dd4be9 100644
--- a/src/components/settings_modal/tabs/filtering_tab.vue
+++ b/src/components/settings_modal/tabs/filtering_tab.vue
@@ -5,34 +5,34 @@
{{ $t('settings.notification_visibility') }}
-
-
+
{{ $t('settings.notification_visibility_likes') }}
-
+
-
-
+
{{ $t('settings.notification_visibility_repeats') }}
-
+
-
-
+
{{ $t('settings.notification_visibility_follows') }}
-
+
-
-
+
{{ $t('settings.notification_visibility_mentions') }}
-
+
-
-
+
{{ $t('settings.notification_visibility_moves') }}
-
+
-
-
+
{{ $t('settings.notification_visibility_emoji_reactions') }}
-
+
@@ -60,14 +60,14 @@
-
- {{ $t('settings.hide_post_stats') }} {{ $t('settings.instance_default', { value: hidePostStatsLocalizedValue }) }}
-
+
+ {{ $t('settings.hide_post_stats') }}
+
-
- {{ $t('settings.hide_user_stats') }} {{ $t('settings.instance_default', { value: hideUserStatsLocalizedValue }) }}
-
+
+ {{ $t('settings.hide_user_stats') }}
+
@@ -80,9 +80,9 @@
/>
-
- {{ $t('settings.hide_filtered_statuses') }} {{ $t('settings.instance_default', { value: hideFilteredStatusesLocalizedValue }) }}
-
+
+ {{ $t('settings.hide_filtered_statuses') }}
+
diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js
index 029ee7a1..2db523be 100644
--- a/src/components/settings_modal/tabs/general_tab.js
+++ b/src/components/settings_modal/tabs/general_tab.js
@@ -1,4 +1,4 @@
-import Checkbox from 'src/components/checkbox/checkbox.vue'
+import BooleanSetting from '../helpers/boolean_setting.vue'
import InterfaceLanguageSwitcher from 'src/components/interface_language_switcher/interface_language_switcher.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
@@ -26,7 +26,7 @@ const GeneralTab = {
}
},
components: {
- Checkbox,
+ BooleanSetting,
InterfaceLanguageSwitcher
},
computed: {
diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue
index a9081793..f93f4ea0 100644
--- a/src/components/settings_modal/tabs/general_tab.vue
+++ b/src/components/settings_modal/tabs/general_tab.vue
@@ -7,14 +7,14 @@
-
+
{{ $t('settings.hide_isp') }}
-
+
-
+
{{ $t('settings.hide_wallpaper') }}
-
+
@@ -22,51 +22,51 @@
{{ $t('nav.timeline') }}
-
-
- {{ $t('settings.hide_muted_posts') }} {{ $t('settings.instance_default', { value: hideMutedPostsLocalizedValue }) }}
-
+
+ {{ $t('settings.hide_muted_posts') }}
+
-
-
- {{ $t('settings.collapse_subject') }} {{ $t('settings.instance_default', { value: collapseMessageWithSubjectLocalizedValue }) }}
-
+
+ {{ $t('settings.collapse_subject') }}
+
-
-
+
{{ $t('settings.streaming') }}
-
+
-
-
{{ $t('settings.pause_on_unfocused') }}
-
+
-
-
+
{{ $t('settings.useStreamingApi') }}
{{ $t('settings.useStreamingApiWarning') }}
-
+
-
-
+
{{ $t('settings.emoji_reactions_on_timeline') }}
-
+
-
-
+
{{ $t('settings.virtual_scrolling') }}
-
+
@@ -75,14 +75,14 @@
{{ $t('settings.composing') }}
-
-
- {{ $t('settings.scope_copy') }} {{ $t('settings.instance_default', { value: scopeCopyLocalizedValue }) }}
-
+
+ {{ $t('settings.scope_copy') }}
+
-
-
- {{ $t('settings.subject_input_always_show') }} {{ $t('settings.instance_default', { value: alwaysShowSubjectInputLocalizedValue }) }}
-
+
+ {{ $t('settings.subject_input_always_show') }}
+
-
@@ -143,19 +143,19 @@
-
-
- {{ $t('settings.minimal_scopes_mode') }} {{ $t('settings.instance_default', { value: minimalScopesModeLocalizedValue }) }}
-
+
+ {{ $t('settings.minimal_scopes_mode') }} {{ minimalScopesModeDefaultValue }}
+
-
-
+
{{ $t('settings.autohide_floating_post_button') }}
-
+
-
-
+
{{ $t('settings.pad_emoji') }}
-
+
@@ -164,14 +164,14 @@
{{ $t('settings.attachments') }}