mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-02 22:31:49 +08:00
Added: options for update helper
This commit is contained in:
@@ -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: '退出'
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user