remainder of old config references
This commit is contained in:
parent
650785bb5b
commit
195e353b3a
4 changed files with 7 additions and 53 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import Checkbox from 'src/components/checkbox/checkbox.vue'
|
||||
import Setting from './setting.js'
|
||||
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
export default {
|
||||
...Setting,
|
||||
data() {
|
||||
|
|
@ -43,7 +45,7 @@ export default {
|
|||
if (this.forceNew) return true
|
||||
if (!this.allowNew) return false
|
||||
|
||||
const isExpert = this.$store.state.config.expertLevel > 0
|
||||
const isExpert = useSyncConfigStore().mergedConfig.expertLevel > 0
|
||||
const hasBuiltins = this.builtinEntries.length > 0
|
||||
|
||||
if (hasBuiltins) {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import SecurityTab from './tabs/security_tab/security_tab.vue'
|
|||
import StyleTab from './tabs/style_tab/style_tab.vue'
|
||||
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import {
|
||||
|
|
@ -83,7 +84,7 @@ const SettingsModalContent = {
|
|||
return useInterfaceStore().settingsModalState === 'visible'
|
||||
},
|
||||
expertLevel() {
|
||||
return this.$store.state.config.expertLevel
|
||||
return useSyncConfigStore().mergedConfig.expertLevel
|
||||
},
|
||||
},
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -38,55 +38,6 @@ const ClutterTab = {
|
|||
Object.entries(store.prefsStorage.simple.muteFilters),
|
||||
muteFiltersObject: (store) => store.prefsStorage.simple.muteFilters,
|
||||
}),
|
||||
onMuteDefaultActionLv1: {
|
||||
get() {
|
||||
const value = this.$store.state.config.onMuteDefaultAction
|
||||
if (value === 'ask' || value === 'forever') {
|
||||
return value
|
||||
} else {
|
||||
return 'temporarily'
|
||||
}
|
||||
},
|
||||
set(value) {
|
||||
let realValue = value
|
||||
if (value !== 'ask' && value !== 'forever') {
|
||||
realValue = '14d'
|
||||
}
|
||||
useSyncConfigStore().setSimplePrefAndSave({
|
||||
path: 'onMuteDefaultAction',
|
||||
value: realValue,
|
||||
})
|
||||
},
|
||||
},
|
||||
onBlockDefaultActionLv1: {
|
||||
get() {
|
||||
const value = this.$store.state.config.onBlockDefaultAction
|
||||
if (value === 'ask' || value === 'forever') {
|
||||
return value
|
||||
} else {
|
||||
return 'temporarily'
|
||||
}
|
||||
},
|
||||
set(value) {
|
||||
let realValue = value
|
||||
if (value !== 'ask' && value !== 'forever') {
|
||||
realValue = '14d'
|
||||
}
|
||||
useSyncConfigStore().setSimplePrefAndSave({
|
||||
path: 'onBlockDefaultAction',
|
||||
value: realValue,
|
||||
})
|
||||
},
|
||||
},
|
||||
muteFiltersDraft() {
|
||||
return Object.entries(this.muteFiltersDraftObject)
|
||||
},
|
||||
muteFiltersExpired() {
|
||||
const now = Date.now()
|
||||
return Object.entries(this.muteFiltersDraftObject).filter(
|
||||
([, { expires }]) => expires != null && expires <= now,
|
||||
)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useSyncConfigStore, [
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ const FilteringTab = {
|
|||
...mapState(useInstanceCapabilitiesStore, ['blockExpiration']),
|
||||
onMuteDefaultActionLv1: {
|
||||
get() {
|
||||
const value = this.$store.state.config.onMuteDefaultAction
|
||||
const value = useSyncConfigStore().mergedConfig.onMuteDefaultAction
|
||||
if (value === 'ask' || value === 'forever') {
|
||||
return value
|
||||
} else {
|
||||
|
|
@ -120,7 +120,7 @@ const FilteringTab = {
|
|||
},
|
||||
onBlockDefaultActionLv1: {
|
||||
get() {
|
||||
const value = this.$store.state.config.onBlockDefaultAction
|
||||
const value = useSyncConfigStore().mergedConfig.onBlockDefaultAction
|
||||
if (value === 'ask' || value === 'forever') {
|
||||
return value
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue