lint
This commit is contained in:
parent
4e21031fde
commit
2520935676
4 changed files with 9 additions and 5 deletions
|
|
@ -5,9 +5,9 @@ const browserLocale = (navigator.language || 'en').split('-')[0]
|
||||||
/// to override it.
|
/// to override it.
|
||||||
export const staticOrApiConfigDefault = {
|
export const staticOrApiConfigDefault = {
|
||||||
name: 'PleromaFE',
|
name: 'PleromaFE',
|
||||||
theme: 'pleroma-dark',
|
theme: null,
|
||||||
palette: null,
|
palette: null,
|
||||||
style: null,
|
style: 'breezy',
|
||||||
themeChecksum: undefined,
|
themeChecksum: undefined,
|
||||||
defaultAvatar: '/images/avi.png',
|
defaultAvatar: '/images/avi.png',
|
||||||
defaultBanner: '/images/banner.png',
|
defaultBanner: '/images/banner.png',
|
||||||
|
|
@ -189,6 +189,7 @@ export const defaultConfigLocal = {
|
||||||
themeDebug: false, // debug mode that uses computed backgrounds instead of real ones to debug contrast functions
|
themeDebug: false, // debug mode that uses computed backgrounds instead of real ones to debug contrast functions
|
||||||
forceThemeRecompilation: false, // flag that forces recompilation on boot even if cache exists
|
forceThemeRecompilation: false, // flag that forces recompilation on boot even if cache exists
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LOCAL_ONLY_KEYS = new Set(Object.keys(defaultConfigLocal))
|
export const LOCAL_ONLY_KEYS = new Set(Object.keys(defaultConfigLocal))
|
||||||
|
|
||||||
export const makeUndefined = (c) =>
|
export const makeUndefined = (c) =>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ import { defineStore } from 'pinia'
|
||||||
|
|
||||||
import { instanceDefaultProperties } from '../modules/config.js'
|
import { instanceDefaultProperties } from '../modules/config.js'
|
||||||
import {
|
import {
|
||||||
instanceDefaultConfig,
|
|
||||||
defaultConfigLocal,
|
defaultConfigLocal,
|
||||||
|
instanceDefaultConfig,
|
||||||
staticOrApiConfigDefault,
|
staticOrApiConfigDefault,
|
||||||
} from '../modules/default_config_state.js'
|
} from '../modules/default_config_state.js'
|
||||||
import apiService from '../services/api/api.service.js'
|
import apiService from '../services/api/api.service.js'
|
||||||
|
|
|
||||||
|
|
@ -643,7 +643,9 @@ export const useSyncConfigStore = defineStore('sync_config', {
|
||||||
vuexState.config = vuexState.config ?? {}
|
vuexState.config = vuexState.config ?? {}
|
||||||
|
|
||||||
const migratedEntries = new Set(vuexState.config._syncMigration ?? [])
|
const migratedEntries = new Set(vuexState.config._syncMigration ?? [])
|
||||||
console.debug(`Already migrated Values: ${[...migratedEntries].join() || '[none]'}`)
|
console.debug(
|
||||||
|
`Already migrated Values: ${[...migratedEntries].join() || '[none]'}`,
|
||||||
|
)
|
||||||
|
|
||||||
Object.entries(oldDefaultConfigSync).forEach(([key, value]) => {
|
Object.entries(oldDefaultConfigSync).forEach(([key, value]) => {
|
||||||
const oldValue = vuexState.config[key]
|
const oldValue = vuexState.config[key]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { createPinia, setActivePinia } from 'pinia'
|
import { createPinia, setActivePinia } from 'pinia'
|
||||||
|
|
||||||
|
import { CURRENT_UPDATE_COUNTER } from 'src/components/update_notification/update_notification.js'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
_getAllFlags,
|
_getAllFlags,
|
||||||
_getRecentData,
|
_getRecentData,
|
||||||
|
|
@ -15,7 +17,6 @@ import {
|
||||||
useSyncConfigStore,
|
useSyncConfigStore,
|
||||||
VERSION,
|
VERSION,
|
||||||
} from 'src/stores/sync_config.js'
|
} from 'src/stores/sync_config.js'
|
||||||
import { CURRENT_UPDATE_COUNTER } from 'src/components/update_notification/update_notification.js'
|
|
||||||
|
|
||||||
describe('The SyncConfig store', () => {
|
describe('The SyncConfig store', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue