diff --git a/src/background.js b/src/background.js index 7d71c7e..dcf899f 100644 --- a/src/background.js +++ b/src/background.js @@ -3,7 +3,6 @@ import './lib/site/server' import { app, protocol, BrowserWindow, globalShortcut, ipcMain } from 'electron' import { createProtocol } from 'vue-cli-plugin-electron-builder/lib' -import { autoUpdater } from 'electron-updater' import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer' const isDevelopment = process.env.NODE_ENV !== 'production' @@ -15,8 +14,6 @@ let mini protocol.registerSchemesAsPrivileged([{ scheme: 'app', privileges: { secure: true, standard: true } }]) -autoUpdater.autoDownload = false - function createWindow () { win = new BrowserWindow({ width: 1080, @@ -100,16 +97,6 @@ ipcMain.on('win', () => { win.webContents.send('miniClosed') }) -ipcMain.on('update', async () => { - const checkForUpdates = await autoUpdater.checkForUpdates() - win.webContents.send('update-replay-check', checkForUpdates) - const res = await autoUpdater.downloadUpdate() - win.webContents.send('update-replay-download', res) - autoUpdater.on('update-downloaded', () => { - win.webContents.send('update-replay-downloaded', 'downloaded') - }) -}) - const gotTheLock = app.requestSingleInstanceLock() if (!gotTheLock) { app.quit() diff --git a/src/components/Setting.vue b/src/components/Setting.vue index 6f73499..7338628 100644 --- a/src/components/Setting.vue +++ b/src/components/Setting.vue @@ -7,7 +7,6 @@ Github 当前版本v{{pkg.version}} 反馈 最新版本v{{latestVersion}} - 检查更新
视图
@@ -144,7 +143,7 @@ import { mapMutations } from 'vuex' import pkg from '../../package.json' import { setting, sites, shortcut } from '../lib/dexie' import { sites as defaultSites } from '../lib/dexie/initData' -import { shell, clipboard, remote, ipcRenderer } from 'electron' +import { shell, clipboard, remote } from 'electron' import db from '../lib/dexie/dexie' const _hmt = window._hmt export default { @@ -373,18 +372,6 @@ export default { e.preventDefault() menu.popup(remote.getCurrentWindow()) }) - }, - checkUpdate () { - ipcRenderer.send('update') - ipcRenderer.on('update-replay-check', (e, res) => { - console.log(res, 'update-replay-check') - }) - ipcRenderer.on('update-replay-download', (e, res) => { - console.log(res, 'update-replay-download') - }) - ipcRenderer.on('update-replay-downloaded', (e, res) => { - console.log(res, 'update-replay-downloaded') - }) } }, created () {