Added: options for update helper

This commit is contained in:
Molunerfinn
2018-01-10 17:12:24 +08:00
parent b4c760c8cd
commit dc9d5d6dfb
2 changed files with 19 additions and 2 deletions

View File

@@ -101,6 +101,15 @@ function createTray () {
}
]
},
{
label: '打开更新助手',
type: 'checkbox',
checked: db.get('picBed.showUpdateTip').value(),
click () {
const value = db.read().get('picBed.showUpdateTip').value()
db.read().set('picBed.showUpdateTip', !value).write()
}
},
{
role: 'quit',
label: '退出'

View File

@@ -68,7 +68,6 @@
<script>
import pkg from '../../../package.json'
import { remote } from 'electron'
import os from 'os'
const { Menu, dialog, BrowserWindow } = remote
export default {
name: 'setting-page',
@@ -82,7 +81,7 @@ export default {
}
},
created () {
this.os = os.platform()
this.os = process.platform
this.buildMenu()
},
methods: {
@@ -117,6 +116,15 @@ export default {
click () {
_this.visible = true
}
},
{
label: '打开更新助手',
type: 'checkbox',
checked: _this.$db.get('picBed.showUpdateTip').value(),
click () {
const value = _this.$db.read().get('picBed.showUpdateTip').value()
_this.$db.read().set('picBed.showUpdateTip', !value).write()
}
}
]
this.menu = Menu.buildFromTemplate(template)