diff --git a/packages/gui/src/bridge/update/backend.js b/packages/gui/src/bridge/update/backend.js index 2cb0efae..0237b6d3 100644 --- a/packages/gui/src/bridge/update/backend.js +++ b/packages/gui/src/bridge/update/backend.js @@ -7,7 +7,7 @@ import path from 'path' // eslint-disable-next-line no-unused-vars const isMac = process.platform === 'darwin' // 检测更新,在你想要检查更新的时候执行,renderer事件触发后的操作自行编写 -function updateHandle (app, win, beforeQuit, updateUrl,log) { +function updateHandle (app, win, beforeQuit, updateUrl, log) { // // 更新前,删除本地安装包 ↓ // const updaterCacheDirName = 'dev-sidecar-updater' // const updatePendingPath = path.join(autoUpdater.app.baseCachePath, updaterCacheDirName, 'pending') @@ -57,10 +57,7 @@ function updateHandle (app, win, beforeQuit, updateUrl,log) { log.info('download complete', info.version) win.webContents.send('update', { key: 'downloaded', - value: { - version: info.version, - releaseData: info.releaseDate - } + value: info }) }) @@ -97,7 +94,7 @@ function updateHandle (app, win, beforeQuit, updateUrl,log) { export default { install (context) { - const { app, win, beforeQuit,log } = context + const { app, win, beforeQuit, log } = context let updateUrl = 'https://dev-sidecar.docmirror.cn/update/' if (process.env.NODE_ENV === 'development') { Object.defineProperty(app, 'isPackaged', { @@ -105,9 +102,9 @@ export default { return true } }) - updateUrl = 'https://dev-sidecar.docmirror.cn/update/' - // updateUrl = 'http://localhost/dev-sidecar/' + // updateUrl = 'https://dev-sidecar.docmirror.cn/update/' + updateUrl = 'http://localhost/dev-sidecar/' } - updateHandle(app, win, beforeQuit, updateUrl,log) + updateHandle(app, win, beforeQuit, updateUrl, log) } } diff --git a/packages/gui/src/bridge/update/front.js b/packages/gui/src/bridge/update/front.js index 960f9db6..79f609a3 100644 --- a/packages/gui/src/bridge/update/front.js +++ b/packages/gui/src/bridge/update/front.js @@ -78,11 +78,19 @@ function install (app, api) { function newUpdateIsReady (value) { updateParams.downloading = false app.$confirm({ - title: '新版本已准备好', - content: `是否立即升级安装v${value.version}?`, + title: `新版本(v${value.version})已准备好,是否立即升级?`, cancelText: '暂不升级', okText: '立即升级', - // content: h =>