From 1f71e673d5313837ea3ce33b37c19f7ee9190a9c Mon Sep 17 00:00:00 2001 From: Tom JEANNESSON Date: Thu, 14 Mar 2024 20:27:39 +0100 Subject: [PATCH] tmp --- desktop-app/main/background.ts | 54 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/desktop-app/main/background.ts b/desktop-app/main/background.ts index a39ab4f0..512e059d 100644 --- a/desktop-app/main/background.ts +++ b/desktop-app/main/background.ts @@ -1,5 +1,5 @@ import { EnvironmentStatus } from '@aws-sdk/client-elastic-beanstalk' -import { BrowserWindow, app, autoUpdater, dialog, ipcMain } from 'electron' +import { BrowserWindow, app, ipcMain } from 'electron' import serve from 'electron-serve' import { EB_APP_NAME, @@ -25,34 +25,34 @@ if (isProd) { ;(async () => { await app.whenReady() - if (isProd) { - const server = 'https://hazel-c8oqh794d-napse-investment.vercel.app/' - const url = `${server}/update/${process.platform}/${app.getVersion()}` + // if (isProd) { + // const server = 'https://hazel-c8oqh794d-napse-investment.vercel.app/' + // const url = `${server}/update/${process.platform}/${app.getVersion()}` - autoUpdater.setFeedURL({ url }) - setInterval(() => { - autoUpdater.checkForUpdates() - }, 60000) - autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => { - const dialogOpts = { - type: 'info', - buttons: ['Restart', 'Later'], - title: 'Application Update', - message: process.platform === 'win32' ? releaseNotes : releaseName, - detail: - 'A new version has been downloaded. Restart the application to apply the updates.' - } + // autoUpdater.setFeedURL({ url }) + // setInterval(() => { + // autoUpdater.checkForUpdates() + // }, 60000) + // autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => { + // const dialogOpts = { + // type: 'info', + // buttons: ['Restart', 'Later'], + // title: 'Application Update', + // message: process.platform === 'win32' ? releaseNotes : releaseName, + // detail: + // 'A new version has been downloaded. Restart the application to apply the updates.' + // } - dialog.showMessageBox(dialogOpts).then((returnValue) => { - if (returnValue.response === 0) autoUpdater.quitAndInstall() - }) - console.log('update-downloaded') - }) - autoUpdater.on('error', (message) => { - console.error('There was a problem updating the application') - console.error(message) - }) - } + // dialog.showMessageBox(dialogOpts).then((returnValue) => { + // if (returnValue.response === 0) autoUpdater.quitAndInstall() + // }) + // console.log('update-downloaded') + // }) + // autoUpdater.on('error', (message) => { + // console.error('There was a problem updating the application') + // console.error(message) + // }) + // } const mainWindow = createWindow('main', { width: 1000,