setOption pass 1

This commit is contained in:
Henry Jameson 2026-02-16 02:24:44 +02:00
commit 6124d9c04c
12 changed files with 39 additions and 40 deletions

View file

@ -52,8 +52,8 @@ const ClutterTab = {
if (value !== 'ask' && value !== 'forever') {
realValue = '14d'
}
this.$store.dispatch('setOption', {
name: 'onMuteDefaultAction',
useSyncConfigStore().setPreference({
path: 'simple.onMuteDefaultAction',
value: realValue,
})
},
@ -72,8 +72,8 @@ const ClutterTab = {
if (value !== 'ask' && value !== 'forever') {
realValue = '14d'
}
this.$store.dispatch('setOption', {
name: 'onBlockDefaultAction',
useSyncConfigStore().setPreference({
path: 'simple.onBlockDefaultAction',
value: realValue,
})
},

View file

@ -120,8 +120,8 @@ const ComposingTab = {
return useSyncConfigStore().mergedConfig.interfaceLanguage
},
set: function (val) {
this.$store.dispatch('setOption', {
name: 'interfaceLanguage',
useSyncConfigStore().setPreference({
path: 'simple.interfaceLanguage',
value: val,
})
},
@ -172,8 +172,8 @@ const ComposingTab = {
})
},
updateFont(key, value) {
this.$store.dispatch('setOption', {
name: 'theme3hacks',
useSyncConfigStore().setPreference({
path: 'simple.theme3hacks',
value: {
...this.mergedConfig.theme3hacks,
fonts: {

View file

@ -112,8 +112,8 @@ const FilteringTab = {
if (value !== 'ask' && value !== 'forever') {
realValue = '14d'
}
this.$store.dispatch('setOption', {
name: 'onMuteDefaultAction',
useSyncConfigStore().setPreference({
path: 'simple.onMuteDefaultAction',
value: realValue,
})
},
@ -132,8 +132,8 @@ const FilteringTab = {
if (value !== 'ask' && value !== 'forever') {
realValue = '14d'
}
this.$store.dispatch('setOption', {
name: 'onBlockDefaultAction',
useSyncConfigStore().setPreference({
path: 'simple.onBlockDefaultAction',
value: realValue,
})
},

View file

@ -10,8 +10,8 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
import UnitSetting from '../helpers/unit_setting.vue'
import { useInstanceStore } from 'src/stores/instance.js'
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
import { useSyncConfigStore } from 'src/stores/sync_config.js'
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
import localeService from 'src/services/locale/locale.service.js'
@ -41,8 +41,8 @@ const GeneralTab = {
return useSyncConfigStore().mergedConfig.interfaceLanguage
},
set: function (val) {
this.$store.dispatch('setOption', {
name: 'interfaceLanguage',
useSyncConfigStore().setPreference({
path: 'simple.interfaceLanguage',
value: val,
})
},
@ -69,8 +69,8 @@ const GeneralTab = {
})
},
updateFont(key, value) {
this.$store.dispatch('setOption', {
name: 'theme3hacks',
useSyncConfigStore().setPreference({
path: 'simple.theme3hacks',
value: {
...this.mergedConfig.theme3hacks,
fonts: {

View file

@ -67,8 +67,8 @@ const GeneralTab = {
},
methods: {
updateFont(key, value) {
this.$store.dispatch('setOption', {
name: 'theme3hacks',
useSyncConfigStore().setPreference({
path: 'simple.theme3hacks',
value: {
...this.mergedConfig.theme3hacks,
fonts: {