mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-05 07:28:42 +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',
|
role: 'quit',
|
||||||
label: '退出'
|
label: '退出'
|
||||||
|
|||||||
@@ -68,7 +68,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import pkg from '../../../package.json'
|
import pkg from '../../../package.json'
|
||||||
import { remote } from 'electron'
|
import { remote } from 'electron'
|
||||||
import os from 'os'
|
|
||||||
const { Menu, dialog, BrowserWindow } = remote
|
const { Menu, dialog, BrowserWindow } = remote
|
||||||
export default {
|
export default {
|
||||||
name: 'setting-page',
|
name: 'setting-page',
|
||||||
@@ -82,7 +81,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this.os = os.platform()
|
this.os = process.platform
|
||||||
this.buildMenu()
|
this.buildMenu()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -117,6 +116,15 @@ export default {
|
|||||||
click () {
|
click () {
|
||||||
_this.visible = true
|
_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)
|
this.menu = Menu.buildFromTemplate(template)
|
||||||
|
|||||||
Reference in New Issue
Block a user