post-merge headache
This commit is contained in:
parent
3530830b07
commit
90ac30249b
18 changed files with 90 additions and 91 deletions
|
|
@ -3,7 +3,7 @@ import { set } from 'lodash'
|
|||
|
||||
import messages from '../i18n/messages'
|
||||
import localeService from '../services/locale/locale.service.js'
|
||||
import { applyConfig } from '../services/style_setter/style_setter.js'
|
||||
import { applyStyleConfig } from '../services/style_setter/style_setter.js'
|
||||
import { defaultState, instanceDefaultConfig } from './default_config_state.js'
|
||||
|
||||
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||
|
|
@ -71,7 +71,7 @@ const config = {
|
|||
mutations: {
|
||||
setOptionTemporarily(state, { name, value }) {
|
||||
set(state, name, value)
|
||||
applyConfig(state)
|
||||
applyStyleConfig(state)
|
||||
},
|
||||
setOption(state, { name, value }) {
|
||||
set(state, name, value)
|
||||
|
|
@ -162,7 +162,7 @@ const config = {
|
|||
} else {
|
||||
commit('setOption', { name, value })
|
||||
if (APPEARANCE_SETTINGS_KEYS.has(name)) {
|
||||
applyConfig(state)
|
||||
applyStyleConfig(state)
|
||||
}
|
||||
if (name.startsWith('theme3hacks')) {
|
||||
dispatch('applyTheme', { recompile: true })
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
const browserLocale = (window.navigator.language || 'en').split('-')[0]
|
||||
const browserLocale = (navigator.language || 'en').split('-')[0]
|
||||
|
||||
/// Instance config entries provided by static config or pleroma api
|
||||
/// Put settings here only if it does not make sense for a normal user
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import {
|
|||
} from '../services/notification_utils/notification_utils.js'
|
||||
|
||||
import { useReportsStore } from 'src/stores/reports.js'
|
||||
import { useServerSideStorageStore } from 'src/stores/serverSideStorage.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
const emptyNotifications = () => ({
|
||||
desktopNotificationSilence: true,
|
||||
|
|
@ -119,9 +119,7 @@ export const notifications = {
|
|||
|
||||
maybeShowNotification(
|
||||
store,
|
||||
Object.values(
|
||||
useServerSideStorageStore().prefsStorage.simple.muteFilters,
|
||||
),
|
||||
Object.values(useSyncConfigStore().prefsStorage.simple.muteFilters),
|
||||
notification,
|
||||
)
|
||||
} else if (notification.seen) {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import { useInstanceStore } from 'src/stores/instance.js'
|
|||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import { declarations } from 'src/modules/config_declaration'
|
||||
|
||||
|
|
@ -682,7 +682,7 @@ const users = {
|
|||
useInterfaceStore().setLastTimeline('public-timeline')
|
||||
useInterfaceStore().setLayoutWidth(windowWidth())
|
||||
useInterfaceStore().setLayoutHeight(windowHeight())
|
||||
store.commit('clearServerSideStorage')
|
||||
//useSyncConfigStore().clearSyncConfig()
|
||||
})
|
||||
},
|
||||
loginUser(store, accessToken) {
|
||||
|
|
@ -702,7 +702,7 @@ const users = {
|
|||
user.domainMutes = []
|
||||
commit('setCurrentUser', user)
|
||||
|
||||
useServerSideStorageStore().setServerSideStorage(user)
|
||||
useSyncConfigStore().setSyncConfig(user)
|
||||
commit('addNewUsers', [user])
|
||||
|
||||
useEmojiStore().fetchEmoji()
|
||||
|
|
@ -723,17 +723,16 @@ const users = {
|
|||
/*
|
||||
// Reset wordfilter
|
||||
Object.keys(
|
||||
useServerSideStorageStore().prefsStorage.simple.muteFilters
|
||||
useSyncConfigStore().prefsStorage.simple.muteFilters
|
||||
).forEach(key => {
|
||||
useServerSideStorageStore().unsetPreference({ path: 'simple.muteFilters.' + key, value: null })
|
||||
useSyncConfigStore().unsetPreference({ path: 'simple.muteFilters.' + key, value: null })
|
||||
})
|
||||
|
||||
// Reset flag to 0 to re-run migrations
|
||||
useServerSideStorageStore().setFlag({ flag: 'configMigration', value: 0 })
|
||||
useSyncConfigStore().setFlag({ flag: 'configMigration', value: 0 })
|
||||
/**/
|
||||
|
||||
const { configMigration } =
|
||||
useServerSideStorageStore().flagStorage
|
||||
const { configMigration } = useSyncConfigStore().flagStorage
|
||||
declarations
|
||||
.filter((x) => {
|
||||
return (
|
||||
|
|
@ -744,12 +743,12 @@ const users = {
|
|||
})
|
||||
.toSorted((a, b) => a.configMigration - b.configMigration)
|
||||
.forEach((value) => {
|
||||
value.migration(useServerSideStorageStore(), store.rootState)
|
||||
useServerSideStorageStore().setFlag({
|
||||
value.migration(useSyncConfigStore(), store.rootState)
|
||||
useSyncConfigStore().setFlag({
|
||||
flag: 'configMigration',
|
||||
value: value.migrationNum,
|
||||
})
|
||||
useServerSideStorageStore().pushServerSideStorage()
|
||||
useSyncConfigStore().pushSyncConfig()
|
||||
})
|
||||
|
||||
if (user.token) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue