massive rename and separation merged config into its own "store"
This commit is contained in:
parent
1be0debc63
commit
4e235562aa
65 changed files with 272 additions and 221 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
|
||||
export const CONFIG_MIGRATION = 1
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ export const declarations = [
|
|||
description: 'Mute filters, wordfilter/regexp/etc',
|
||||
valueType: 'complex',
|
||||
migration(serverside, rootState) {
|
||||
useSyncConfigStore().mergedConfig.muteWords.forEach((word, order) => {
|
||||
useMergedConfigStore().mergedConfig.muteWords.forEach((word, order) => {
|
||||
const uniqueId = uuidv4()
|
||||
|
||||
serverside.setPreference({
|
||||
|
|
|
|||
|
|
@ -615,6 +615,7 @@ export const LOCAL_DEFAULT_CONFIG_DEFINITIONS = {
|
|||
},
|
||||
underlay: {
|
||||
description: 'Underlay override',
|
||||
required: true,
|
||||
default: 'none',
|
||||
},
|
||||
fontInterface: {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
maybeShowNotification,
|
||||
} from '../services/notification_utils/notification_utils.js'
|
||||
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useReportsStore } from 'src/stores/reports.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
|
|
@ -118,8 +119,8 @@ export const notifications = {
|
|||
commit('addNewNotifications', { notifications: [notification] })
|
||||
|
||||
maybeShowNotification(
|
||||
useSyncConfigStore().mergedConfig.notificationVisibility,
|
||||
store,
|
||||
useMergedConfigStore().mergedConfig.notificationVisibility,
|
||||
Object.values(useSyncConfigStore().prefsStorage.simple.muteFilters),
|
||||
notification,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import { useEmojiStore } from 'src/stores/emoji.js'
|
|||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
import { useUserHighlightStore } from 'src/stores/user_highlight.js'
|
||||
|
|
@ -554,9 +555,9 @@ const users = {
|
|||
registerPushNotifications(store) {
|
||||
const token = store.state.currentUser.credentials
|
||||
const vapidPublicKey = useInstanceStore().vapidPublicKey
|
||||
const isEnabled = useSyncConfigStore().mergedConfig.webPushNotifications
|
||||
const isEnabled = useMergedConfigStore().mergedConfig.webPushNotifications
|
||||
const notificationVisibility =
|
||||
useSyncConfigStore().mergedConfig.notificationVisibility
|
||||
useMergedConfigStore().mergedConfig.notificationVisibility
|
||||
|
||||
registerPushNotifications(
|
||||
isEnabled,
|
||||
|
|
@ -789,7 +790,7 @@ const users = {
|
|||
dispatch('startFetchingFollowRequests')
|
||||
}
|
||||
|
||||
if (useSyncConfigStore().mergedConfig.useStreamingApi) {
|
||||
if (useMergedConfigStore().mergedConfig.useStreamingApi) {
|
||||
dispatch('fetchTimeline', { timeline: 'friends', since: null })
|
||||
dispatch('fetchNotifications', { since: null })
|
||||
dispatch('enableMastoSockets', true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue