diff --git a/src/main/index.js b/src/main/index.js index 204c086..04301ae 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -470,6 +470,10 @@ app.on('will-quit', () => { globalShortcut.unregisterAll() }) +app.setLoginItemSettings({ + openAtLogin: db.read().get('picBed.autoStart').value() || false +}) + /** * Auto Updater * diff --git a/src/renderer/components/SettingView/PicGoSetting.vue b/src/renderer/components/SettingView/PicGoSetting.vue index 2768050..f58f167 100644 --- a/src/renderer/components/SettingView/PicGoSetting.vue +++ b/src/renderer/components/SettingView/PicGoSetting.vue @@ -38,6 +38,7 @@ v-model="form.autoStart" active-text="开" inactive-text="关" + @change="handleAutoStartChange" >