张恒

修正错误字以及更新依赖

此文件的差异太大,无法显示。
......@@ -84,28 +84,28 @@
"vuex-electron": "^1.0.3"
},
"devDependencies": {
"@babel/core": "^7.7.5",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-decorators": "^7.7.4",
"@babel/plugin-proposal-do-expressions": "^7.7.4",
"@babel/plugin-proposal-export-default-from": "^7.7.4",
"@babel/plugin-proposal-export-namespace-from": "^7.7.4",
"@babel/plugin-proposal-function-bind": "^7.7.4",
"@babel/plugin-proposal-function-sent": "^7.7.4",
"@babel/plugin-proposal-json-strings": "^7.7.4",
"@babel/plugin-proposal-logical-assignment-operators": "^7.7.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",
"@babel/plugin-proposal-numeric-separator": "^7.7.4",
"@babel/plugin-proposal-optional-chaining": "^7.7.5",
"@babel/plugin-proposal-pipeline-operator": "^7.7.4",
"@babel/plugin-proposal-throw-expressions": "^7.7.4",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/plugin-syntax-import-meta": "^7.7.4",
"@babel/plugin-transform-runtime": "^7.7.6",
"@babel/polyfill": "^7.7.0",
"@babel/preset-env": "^7.7.6",
"@babel/register": "^7.7.4",
"@babel/runtime": "^7.7.6",
"@babel/core": "^7.8.0",
"@babel/plugin-proposal-class-properties": "^7.8.0",
"@babel/plugin-proposal-decorators": "^7.8.0",
"@babel/plugin-proposal-do-expressions": "^7.8.0",
"@babel/plugin-proposal-export-default-from": "^7.8.0",
"@babel/plugin-proposal-export-namespace-from": "^7.8.0",
"@babel/plugin-proposal-function-bind": "^7.8.0",
"@babel/plugin-proposal-function-sent": "^7.8.0",
"@babel/plugin-proposal-json-strings": "^7.8.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.8.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.0",
"@babel/plugin-proposal-numeric-separator": "^7.8.0",
"@babel/plugin-proposal-optional-chaining": "^7.8.0",
"@babel/plugin-proposal-pipeline-operator": "^7.8.0",
"@babel/plugin-proposal-throw-expressions": "^7.8.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.0",
"@babel/plugin-syntax-import-meta": "^7.8.0",
"@babel/plugin-transform-runtime": "^7.8.0",
"@babel/polyfill": "^7.8.0",
"@babel/preset-env": "^7.8.2",
"@babel/register": "^7.8.0",
"@babel/runtime": "^7.8.0",
"ajv": "^6.10.2",
"babel-eslint": "^9.0.0",
"babel-loader": "^8.0.6",
......@@ -115,7 +115,7 @@
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.1.1",
"cross-env": "^6.0.3",
"css-loader": "^3.4.1",
"css-loader": "^3.4.2",
"del": "^5.1.0",
"electron": "^7.1.8",
"electron-builder": "^21.2.0",
......@@ -125,7 +125,7 @@
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^3.0.3",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-node": "^9.2.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
......@@ -137,11 +137,11 @@
"node-loader": "^0.6.0",
"node-sass": "^4.13.0",
"portfinder": "^1.0.25",
"sass-loader": "^8.0.0",
"sass-loader": "^8.0.1",
"split2": "^3.1.1",
"style-loader": "^1.1.2",
"svg-sprite-loader": "^4.1.6",
"terser-webpack-plugin": "^2.3.1",
"terser-webpack-plugin": "^2.3.2",
"through2-filter": "^3.0.0",
"url-loader": "^3.0.0",
"vue-html-loader": "^1.2.4",
......
import { autoUpdater } from 'electron-updater'
import { ipcMain } from 'electron'
/**
* -1 检查更新失败 0 正在检查更新 1 检测到新版本,准备下载 2 未检测到新版本 3 下载中 4 下载暂停 5 下载暂停恢复 6 下载完成 7 下载失败 8 取消下载
* */
* -1 检查更新失败 0 正在检查更新 1 检测到新版本,准备下载 2 未检测到新版本 3 下载中 4 下载完成
**/
function Message (mainWindow, type, data) {
const senddata = {
state: type,
......
......@@ -21,7 +21,7 @@ if (os.platform().includes('win32')) {
}
export default {
download (mainWindow) {
ipcMain.on('satrt-download', (event, msg) => {
ipcMain.on('start-download', (event, msg) => {
mainWindow.webContents.downloadURL(msg.downloadUrL || defaultDownloadUrL)
event.reply('confirm-download', true)
mainWindow.webContents.session.on('will-download', (event, item, webContents) => {
......
......@@ -21,7 +21,7 @@ const loadingURL = process.env.NODE_ENV === 'development' ? `http://localhost:${
var loadWindow = null
var mainWindow = null
function createMainWindow() {
function createMainWindow () {
/**
* Initial window options
*/
......@@ -83,7 +83,7 @@ function createMainWindow() {
})
}
function loadindWindow() {
function loadindWindow () {
loadWindow = new BrowserWindow({
width: 400,
height: 600,
......@@ -100,13 +100,13 @@ function loadindWindow() {
setTimeout(() => {
createMainWindow()
}, 2000)
loadWindow.on('closed', () => {
loadWindow = null
})
}
function initWindow() {
function initWindow () {
if (config.UseStartupChart) {
return loadindWindow()
} else {
......
......@@ -179,7 +179,7 @@ export default {
break;
case "two":
console.log(111);
ipcApi.send("satrt-download");
ipcApi.send("start-download");
ipcApi.on("confirm-download", (event, arg) => {
if (arg) {
this.dialogVisible = true;
......