正在显示
6 个修改的文件
包含
34 行增加
和
34 行删除
此文件的差异太大,无法显示。
| ... | @@ -84,28 +84,28 @@ | ... | @@ -84,28 +84,28 @@ |
| 84 | "vuex-electron": "^1.0.3" | 84 | "vuex-electron": "^1.0.3" |
| 85 | }, | 85 | }, |
| 86 | "devDependencies": { | 86 | "devDependencies": { |
| 87 | - "@babel/core": "^7.7.5", | 87 | + "@babel/core": "^7.8.0", |
| 88 | - "@babel/plugin-proposal-class-properties": "^7.7.4", | 88 | + "@babel/plugin-proposal-class-properties": "^7.8.0", |
| 89 | - "@babel/plugin-proposal-decorators": "^7.7.4", | 89 | + "@babel/plugin-proposal-decorators": "^7.8.0", |
| 90 | - "@babel/plugin-proposal-do-expressions": "^7.7.4", | 90 | + "@babel/plugin-proposal-do-expressions": "^7.8.0", |
| 91 | - "@babel/plugin-proposal-export-default-from": "^7.7.4", | 91 | + "@babel/plugin-proposal-export-default-from": "^7.8.0", |
| 92 | - "@babel/plugin-proposal-export-namespace-from": "^7.7.4", | 92 | + "@babel/plugin-proposal-export-namespace-from": "^7.8.0", |
| 93 | - "@babel/plugin-proposal-function-bind": "^7.7.4", | 93 | + "@babel/plugin-proposal-function-bind": "^7.8.0", |
| 94 | - "@babel/plugin-proposal-function-sent": "^7.7.4", | 94 | + "@babel/plugin-proposal-function-sent": "^7.8.0", |
| 95 | - "@babel/plugin-proposal-json-strings": "^7.7.4", | 95 | + "@babel/plugin-proposal-json-strings": "^7.8.0", |
| 96 | - "@babel/plugin-proposal-logical-assignment-operators": "^7.7.4", | 96 | + "@babel/plugin-proposal-logical-assignment-operators": "^7.8.0", |
| 97 | - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4", | 97 | + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.0", |
| 98 | - "@babel/plugin-proposal-numeric-separator": "^7.7.4", | 98 | + "@babel/plugin-proposal-numeric-separator": "^7.8.0", |
| 99 | - "@babel/plugin-proposal-optional-chaining": "^7.7.5", | 99 | + "@babel/plugin-proposal-optional-chaining": "^7.8.0", |
| 100 | - "@babel/plugin-proposal-pipeline-operator": "^7.7.4", | 100 | + "@babel/plugin-proposal-pipeline-operator": "^7.8.0", |
| 101 | - "@babel/plugin-proposal-throw-expressions": "^7.7.4", | 101 | + "@babel/plugin-proposal-throw-expressions": "^7.8.0", |
| 102 | - "@babel/plugin-syntax-dynamic-import": "^7.7.4", | 102 | + "@babel/plugin-syntax-dynamic-import": "^7.8.0", |
| 103 | - "@babel/plugin-syntax-import-meta": "^7.7.4", | 103 | + "@babel/plugin-syntax-import-meta": "^7.8.0", |
| 104 | - "@babel/plugin-transform-runtime": "^7.7.6", | 104 | + "@babel/plugin-transform-runtime": "^7.8.0", |
| 105 | - "@babel/polyfill": "^7.7.0", | 105 | + "@babel/polyfill": "^7.8.0", |
| 106 | - "@babel/preset-env": "^7.7.6", | 106 | + "@babel/preset-env": "^7.8.2", |
| 107 | - "@babel/register": "^7.7.4", | 107 | + "@babel/register": "^7.8.0", |
| 108 | - "@babel/runtime": "^7.7.6", | 108 | + "@babel/runtime": "^7.8.0", |
| 109 | "ajv": "^6.10.2", | 109 | "ajv": "^6.10.2", |
| 110 | "babel-eslint": "^9.0.0", | 110 | "babel-eslint": "^9.0.0", |
| 111 | "babel-loader": "^8.0.6", | 111 | "babel-loader": "^8.0.6", |
| ... | @@ -115,7 +115,7 @@ | ... | @@ -115,7 +115,7 @@ |
| 115 | "clean-webpack-plugin": "^3.0.0", | 115 | "clean-webpack-plugin": "^3.0.0", |
| 116 | "copy-webpack-plugin": "^5.1.1", | 116 | "copy-webpack-plugin": "^5.1.1", |
| 117 | "cross-env": "^6.0.3", | 117 | "cross-env": "^6.0.3", |
| 118 | - "css-loader": "^3.4.1", | 118 | + "css-loader": "^3.4.2", |
| 119 | "del": "^5.1.0", | 119 | "del": "^5.1.0", |
| 120 | "electron": "^7.1.8", | 120 | "electron": "^7.1.8", |
| 121 | "electron-builder": "^21.2.0", | 121 | "electron-builder": "^21.2.0", |
| ... | @@ -125,7 +125,7 @@ | ... | @@ -125,7 +125,7 @@ |
| 125 | "eslint-friendly-formatter": "^4.0.1", | 125 | "eslint-friendly-formatter": "^4.0.1", |
| 126 | "eslint-loader": "^3.0.3", | 126 | "eslint-loader": "^3.0.3", |
| 127 | "eslint-plugin-html": "^6.0.0", | 127 | "eslint-plugin-html": "^6.0.0", |
| 128 | - "eslint-plugin-import": "^2.19.1", | 128 | + "eslint-plugin-import": "^2.20.0", |
| 129 | "eslint-plugin-node": "^9.2.0", | 129 | "eslint-plugin-node": "^9.2.0", |
| 130 | "eslint-plugin-promise": "^4.2.1", | 130 | "eslint-plugin-promise": "^4.2.1", |
| 131 | "eslint-plugin-standard": "^4.0.0", | 131 | "eslint-plugin-standard": "^4.0.0", |
| ... | @@ -137,11 +137,11 @@ | ... | @@ -137,11 +137,11 @@ |
| 137 | "node-loader": "^0.6.0", | 137 | "node-loader": "^0.6.0", |
| 138 | "node-sass": "^4.13.0", | 138 | "node-sass": "^4.13.0", |
| 139 | "portfinder": "^1.0.25", | 139 | "portfinder": "^1.0.25", |
| 140 | - "sass-loader": "^8.0.0", | 140 | + "sass-loader": "^8.0.1", |
| 141 | "split2": "^3.1.1", | 141 | "split2": "^3.1.1", |
| 142 | "style-loader": "^1.1.2", | 142 | "style-loader": "^1.1.2", |
| 143 | "svg-sprite-loader": "^4.1.6", | 143 | "svg-sprite-loader": "^4.1.6", |
| 144 | - "terser-webpack-plugin": "^2.3.1", | 144 | + "terser-webpack-plugin": "^2.3.2", |
| 145 | "through2-filter": "^3.0.0", | 145 | "through2-filter": "^3.0.0", |
| 146 | "url-loader": "^3.0.0", | 146 | "url-loader": "^3.0.0", |
| 147 | "vue-html-loader": "^1.2.4", | 147 | "vue-html-loader": "^1.2.4", | ... | ... |
| 1 | import { autoUpdater } from 'electron-updater' | 1 | import { autoUpdater } from 'electron-updater' |
| 2 | import { ipcMain } from 'electron' | 2 | import { ipcMain } from 'electron' |
| 3 | /** | 3 | /** |
| 4 | - * -1 检查更新失败 0 正在检查更新 1 检测到新版本,准备下载 2 未检测到新版本 3 下载中 4 下载暂停 5 下载暂停恢复 6 下载完成 7 下载失败 8 取消下载 | 4 | + * -1 检查更新失败 0 正在检查更新 1 检测到新版本,准备下载 2 未检测到新版本 3 下载中 4 下载完成 |
| 5 | - * */ | 5 | + **/ |
| 6 | function Message (mainWindow, type, data) { | 6 | function Message (mainWindow, type, data) { |
| 7 | const senddata = { | 7 | const senddata = { |
| 8 | state: type, | 8 | state: type, | ... | ... |
| ... | @@ -21,7 +21,7 @@ if (os.platform().includes('win32')) { | ... | @@ -21,7 +21,7 @@ if (os.platform().includes('win32')) { |
| 21 | } | 21 | } |
| 22 | export default { | 22 | export default { |
| 23 | download (mainWindow) { | 23 | download (mainWindow) { |
| 24 | - ipcMain.on('satrt-download', (event, msg) => { | 24 | + ipcMain.on('start-download', (event, msg) => { |
| 25 | mainWindow.webContents.downloadURL(msg.downloadUrL || defaultDownloadUrL) | 25 | mainWindow.webContents.downloadURL(msg.downloadUrL || defaultDownloadUrL) |
| 26 | event.reply('confirm-download', true) | 26 | event.reply('confirm-download', true) |
| 27 | mainWindow.webContents.session.on('will-download', (event, item, webContents) => { | 27 | mainWindow.webContents.session.on('will-download', (event, item, webContents) => { | ... | ... |
| ... | @@ -21,7 +21,7 @@ const loadingURL = process.env.NODE_ENV === 'development' ? `http://localhost:${ | ... | @@ -21,7 +21,7 @@ const loadingURL = process.env.NODE_ENV === 'development' ? `http://localhost:${ |
| 21 | var loadWindow = null | 21 | var loadWindow = null |
| 22 | var mainWindow = null | 22 | var mainWindow = null |
| 23 | 23 | ||
| 24 | -function createMainWindow() { | 24 | +function createMainWindow () { |
| 25 | /** | 25 | /** |
| 26 | * Initial window options | 26 | * Initial window options |
| 27 | */ | 27 | */ |
| ... | @@ -83,7 +83,7 @@ function createMainWindow() { | ... | @@ -83,7 +83,7 @@ function createMainWindow() { |
| 83 | }) | 83 | }) |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | -function loadindWindow() { | 86 | +function loadindWindow () { |
| 87 | loadWindow = new BrowserWindow({ | 87 | loadWindow = new BrowserWindow({ |
| 88 | width: 400, | 88 | width: 400, |
| 89 | height: 600, | 89 | height: 600, |
| ... | @@ -100,13 +100,13 @@ function loadindWindow() { | ... | @@ -100,13 +100,13 @@ function loadindWindow() { |
| 100 | setTimeout(() => { | 100 | setTimeout(() => { |
| 101 | createMainWindow() | 101 | createMainWindow() |
| 102 | }, 2000) | 102 | }, 2000) |
| 103 | - | 103 | + |
| 104 | loadWindow.on('closed', () => { | 104 | loadWindow.on('closed', () => { |
| 105 | loadWindow = null | 105 | loadWindow = null |
| 106 | }) | 106 | }) |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | -function initWindow() { | 109 | +function initWindow () { |
| 110 | if (config.UseStartupChart) { | 110 | if (config.UseStartupChart) { |
| 111 | return loadindWindow() | 111 | return loadindWindow() |
| 112 | } else { | 112 | } else { | ... | ... |
| ... | @@ -179,7 +179,7 @@ export default { | ... | @@ -179,7 +179,7 @@ export default { |
| 179 | break; | 179 | break; |
| 180 | case "two": | 180 | case "two": |
| 181 | console.log(111); | 181 | console.log(111); |
| 182 | - ipcApi.send("satrt-download"); | 182 | + ipcApi.send("start-download"); |
| 183 | ipcApi.on("confirm-download", (event, arg) => { | 183 | ipcApi.on("confirm-download", (event, arg) => { |
| 184 | if (arg) { | 184 | if (arg) { |
| 185 | this.dialogVisible = true; | 185 | this.dialogVisible = true; | ... | ... |
-
请 注册 或 登录 后发表评论