wip
This commit is contained in:
parent
e05ffbb350
commit
2563f6d285
2 changed files with 6 additions and 4 deletions
|
|
@ -677,6 +677,7 @@ export const useSyncConfigStore = defineStore('sync_config', {
|
|||
// Various migrations
|
||||
console.debug('Migrating from old config')
|
||||
const vuexState = (await storage.getItem('vuex-lz')) ?? {}
|
||||
console.log('### sc', vuexState)
|
||||
const config = vuexState.config ?? {}
|
||||
|
||||
const migratedEntries = new Set(config._syncMigration ?? [])
|
||||
|
|
|
|||
|
|
@ -278,21 +278,22 @@ export const useUserHighlightStore = defineStore('user_highlight', {
|
|||
let dirty = false
|
||||
|
||||
const vuexState = (await storage.getItem('vuex-lz')) ?? {}
|
||||
vuexState.config = vuexState.config ?? {}
|
||||
const highlight = vuexState.config.highlight ?? {}
|
||||
const config = vuexState.config ?? {}
|
||||
const highlight = config.highlight ?? {}
|
||||
|
||||
Object.entries(highlight).forEach(([user, value]) => {
|
||||
if ((highlight[user]._migrated || 0) < 1) {
|
||||
dirty = true
|
||||
needUpload = true
|
||||
this.set({ user, value: clone(value) })
|
||||
vuexState.config.highlight[user]._migrated = 1
|
||||
highlight[user]._migrated = 1
|
||||
console.debug(
|
||||
`[HIGHLIGHT] Migrating user ${user}: ${JSON.stringify(value)}`,
|
||||
)
|
||||
}
|
||||
})
|
||||
storage.setItem('vuex-lz', vuexState)
|
||||
console.log('### uh', vuexState)
|
||||
//storage.setItem('vuex-lz', { ...vuexState, config: { ...config, highlight } })
|
||||
|
||||
if (recent === null) {
|
||||
console.debug(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue