Revert "Temporarily remove persistence."
This reverts commit 0bb1ec30d0
.
This commit is contained in:
parent
0bb1ec30d0
commit
990047725a
1 changed files with 12 additions and 0 deletions
12
src/main.js
12
src/main.js
|
@ -17,6 +17,8 @@ import configModule from './modules/config.js'
|
||||||
|
|
||||||
import VueTimeago from 'vue-timeago'
|
import VueTimeago from 'vue-timeago'
|
||||||
|
|
||||||
|
import createPersistedState from './lib/persisted_state.js'
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
Vue.use(VueRouter)
|
Vue.use(VueRouter)
|
||||||
Vue.use(VueTimeago, {
|
Vue.use(VueTimeago, {
|
||||||
|
@ -26,6 +28,15 @@ Vue.use(VueTimeago, {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const persistedStateOptions = {
|
||||||
|
paths: [
|
||||||
|
'config.hideAttachments',
|
||||||
|
'config.hideNsfw',
|
||||||
|
'statuses.notifications',
|
||||||
|
'users.users'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
const store = new Vuex.Store({
|
const store = new Vuex.Store({
|
||||||
modules: {
|
modules: {
|
||||||
statuses: statusesModule,
|
statuses: statusesModule,
|
||||||
|
@ -33,6 +44,7 @@ const store = new Vuex.Store({
|
||||||
api: apiModule,
|
api: apiModule,
|
||||||
config: configModule
|
config: configModule
|
||||||
},
|
},
|
||||||
|
plugins: [createPersistedState(persistedStateOptions)],
|
||||||
strict: process.env.NODE_ENV !== 'production'
|
strict: process.env.NODE_ENV !== 'production'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue