Added: autoStart

This commit is contained in:
Molunerfinn 2018-05-02 17:17:55 +08:00
parent 282b0dc25c
commit eaa348ad56
2 changed files with 8 additions and 1 deletions

View File

@ -470,6 +470,10 @@ app.on('will-quit', () => {
globalShortcut.unregisterAll()
})
app.setLoginItemSettings({
openAtLogin: db.read().get('picBed.autoStart').value() || false
})
/**
* Auto Updater
*

View File

@ -38,6 +38,7 @@
v-model="form.autoStart"
active-text="开"
inactive-text="关"
@change="handleAutoStartChange"
></el-switch>
</el-form-item>
<el-form-item
@ -164,7 +165,6 @@ export default {
return item.name
}
})
console.log(this.picBed)
},
methods: {
keyDetect (type, event) {
@ -208,6 +208,9 @@ export default {
return item
})
this.$db.read().set('picBed.list', list).write()
},
handleAutoStartChange (val) {
this.$db.read().set('picBed.autoStart', val).write()
}
}
}