Migrate interface module to store
This commit is contained in:
parent
872569ae8e
commit
b1dcea0199
33 changed files with 244 additions and 77 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import merge from 'lodash.merge'
|
||||
import localforage from 'localforage'
|
||||
import { each, get, set, cloneDeep } from 'lodash'
|
||||
import { useInterfaceStore } from '../stores/interface'
|
||||
|
||||
let loaded = false
|
||||
|
||||
|
|
@ -76,12 +77,12 @@ export default function createPersistedState ({
|
|||
.then(success => {
|
||||
if (typeof success !== 'undefined') {
|
||||
if (mutation.type === 'setOption' || mutation.type === 'setCurrentUser') {
|
||||
store.dispatch('settingsSaved', { success })
|
||||
useInterfaceStore().settingsSaved({ success })
|
||||
}
|
||||
}
|
||||
}, error => {
|
||||
if (mutation.type === 'setOption' || mutation.type === 'setCurrentUser') {
|
||||
store.dispatch('settingsSaved', { error })
|
||||
useInterfaceStore().settingsSaved({ error })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue