mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 21:32:49 +00:00
优化客户端升级提示
This commit is contained in:
parent
337b3e5b5d
commit
65393b7809
@ -188,7 +188,7 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$Electron.registerMsgListener('dispatch', (event, args) => {
|
this.$Electron.registerMsgListener('dispatch', args => {
|
||||||
if (!$A.isJson(args)) {
|
if (!$A.isJson(args)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,8 +44,8 @@ export default {
|
|||||||
this.getReleases();
|
this.getReleases();
|
||||||
//
|
//
|
||||||
if (this.$Electron) {
|
if (this.$Electron) {
|
||||||
this.$Electron.registerMsgListener('downloadDone', (event, {result}) => {
|
this.$Electron.registerMsgListener('downloadDone', ({result}) => {
|
||||||
if (result.name == this.repoData.name) {
|
if (result.name == this.repoData.name && this.repoStatus !== 2) {
|
||||||
this.downloadResult = result;
|
this.downloadResult = result;
|
||||||
this.releasesNotification()
|
this.releasesNotification()
|
||||||
}
|
}
|
||||||
@ -202,6 +202,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
releasesNotification() {
|
releasesNotification() {
|
||||||
|
const {tag_name, body} = this.repoReleases;
|
||||||
$A.modalConfirm({
|
$A.modalConfirm({
|
||||||
okText: this.$L('立即更新'),
|
okText: this.$L('立即更新'),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
@ -224,12 +225,12 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
color: 'volcano'
|
color: 'volcano'
|
||||||
}
|
}
|
||||||
}, this.repoReleases.tag_name)
|
}, tag_name)
|
||||||
]),
|
]),
|
||||||
h('MarkdownPreview', {
|
h('MarkdownPreview', {
|
||||||
class: 'notification-body',
|
class: 'notification-body',
|
||||||
props: {
|
props: {
|
||||||
initialValue: this.repoReleases.body
|
initialValue: body
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user