File tree Expand file tree Collapse file tree
packages/neuron-wallet/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { dialog } from 'electron'
2- import { autoUpdater } from 'electron-updater'
2+ import { autoUpdater , UpdateInfo } from 'electron-updater'
33import i18n from 'utils/i18n'
44
55export default class UpdateController {
@@ -27,11 +27,13 @@ export default class UpdateController {
2727 this . enableSender ( )
2828 } )
2929
30- autoUpdater . on ( 'update-available' , ( ) => {
30+ autoUpdater . on ( 'update-available' , ( info : UpdateInfo ) => {
31+ const { version } = info
3132 dialog . showMessageBox (
3233 {
3334 type : 'info' ,
34- message : i18n . t ( 'updater.updates-found-do-you-want-to-update' ) ,
35+ title : version ,
36+ message : i18n . t ( 'updater.updates-found-do-you-want-to-update' , { version } ) ,
3537 buttons : [ i18n . t ( 'updater.update-now' ) , i18n . t ( 'common.no' ) ] ,
3638 } ,
3739 buttonIndex => {
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ export default {
137137 } ,
138138 updater : {
139139 'update-not-available' : 'There are currently no updates available.' ,
140- 'updates-found-do-you-want-to-update' : 'An update is available, do you want to update now?' ,
140+ 'updates-found-do-you-want-to-update' : 'An update ({{version}}) is available, do you want to update now?' ,
141141 'update-now' : 'Update now' ,
142142 'updates-downloaded-about-to-quit-and-install' : 'Update downloaded. Neuron will quit and install the update...' ,
143143 } ,
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ export default {
136136 } ,
137137 updater : {
138138 'update-not-available' : '没有可供升级的新版本。' ,
139- 'updates-found-do-you-want-to-update' : '有可供升级的新版本。马上进行升级吗 ?' ,
139+ 'updates-found-do-you-want-to-update' : '有可供升级的新版本({{version}})。现在进行升级吗 ?' ,
140140 'update-now' : '马上升级' ,
141141 'updates-downloaded-about-to-quit-and-install' : '下载完成。Neuron 将退出并安装新版本...' ,
142142 } ,
You can’t perform that action at this time.
0 commit comments