Merge branch 'settings-import-export' into 'develop'
Settings backup/restore + small fixes See merge request pleroma/pleroma-fe!1372
This commit is contained in:
commit
8b96ea9377
14 changed files with 396 additions and 194 deletions
|
@ -110,6 +110,20 @@ const config = {
|
|||
}
|
||||
},
|
||||
actions: {
|
||||
loadSettings ({ dispatch }, data) {
|
||||
const knownKeys = new Set(Object.keys(defaultState))
|
||||
const presentKeys = new Set(Object.keys(data))
|
||||
const intersection = new Set()
|
||||
for (let elem of presentKeys) {
|
||||
if (knownKeys.has(elem)) {
|
||||
intersection.add(elem)
|
||||
}
|
||||
}
|
||||
|
||||
intersection.forEach(
|
||||
name => dispatch('setOption', { name, value: data[name] })
|
||||
)
|
||||
},
|
||||
setHighlight ({ commit, dispatch }, { user, color, type }) {
|
||||
commit('setHighlight', { user, color, type })
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue