cleanup + fix
This commit is contained in:
parent
fada49768d
commit
3d95ea6acb
3 changed files with 2 additions and 5 deletions
|
@ -116,7 +116,6 @@ const SettingsModal = {
|
|||
if (data) { this.$store.dispatch('loadSettings', data) }
|
||||
},
|
||||
restore () {
|
||||
console.log(this.dataImporter)
|
||||
this.dataImporter.importData()
|
||||
},
|
||||
backup () {
|
||||
|
|
|
@ -111,7 +111,7 @@ const config = {
|
|||
},
|
||||
actions: {
|
||||
loadSettings ({ dispatch }, data) {
|
||||
const knownKeys = new Set(Object.keys(this.state.config))
|
||||
const knownKeys = new Set(Object.keys(defaultState))
|
||||
const presentKeys = new Set(Object.keys(data))
|
||||
const intersection = new Set()
|
||||
for (let elem of presentKeys) {
|
||||
|
@ -120,7 +120,7 @@ const config = {
|
|||
}
|
||||
}
|
||||
|
||||
Object.keys(intersection).forEach(
|
||||
intersection.forEach(
|
||||
name => dispatch('setOption', { name, value: data[name] })
|
||||
)
|
||||
},
|
||||
|
|
|
@ -26,7 +26,6 @@ export const newImporter = ({
|
|||
const filePicker = document.createElement('input')
|
||||
filePicker.setAttribute('type', 'file')
|
||||
filePicker.setAttribute('accept', '.json')
|
||||
console.log(1)
|
||||
|
||||
filePicker.addEventListener('change', event => {
|
||||
if (event.target.files[0]) {
|
||||
|
@ -45,7 +44,6 @@ export const newImporter = ({
|
|||
onImportFailure({ error })
|
||||
}
|
||||
}
|
||||
console.log(2)
|
||||
reader.readAsText(event.target.files[0])
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue