Change auto updater to check continuously. Add Double click to tray.
This commit is contained in:
@@ -22,6 +22,7 @@ import ipcTypes from "../util/ipcTypes.json";
|
||||
import ImportJob from "./decoder/decoder";
|
||||
import LocalServer from "./http-server/http-server";
|
||||
import store from "./store/store";
|
||||
import { checkForAppUpdates } from "./util/checkForAppUpdates";
|
||||
import { getMainWindow } from "./util/toRenderer";
|
||||
import { GetAllEnvFiles } from "./watcher/watcher";
|
||||
|
||||
@@ -147,6 +148,12 @@ function createWindow(): void {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Check for Updates",
|
||||
click: (): void => {
|
||||
checkForAppUpdates();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Development",
|
||||
id: "development",
|
||||
@@ -169,7 +176,7 @@ function createWindow(): void {
|
||||
{
|
||||
label: "Check for updates",
|
||||
click: (): void => {
|
||||
autoUpdater.checkForUpdates();
|
||||
checkForAppUpdates();
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -369,22 +376,26 @@ app.whenReady().then(async () => {
|
||||
},
|
||||
]);
|
||||
|
||||
tray.on("double-click", () => {
|
||||
openMainWindow();
|
||||
});
|
||||
|
||||
tray.setContextMenu(contextMenu);
|
||||
|
||||
//Check for app updates.
|
||||
autoUpdater.logger = log;
|
||||
|
||||
if (import.meta.env.DEV) {
|
||||
// Useful for some dev/debugging tasks, but download can
|
||||
// not be validated becuase dev app is not signed
|
||||
autoUpdater.channel = "alpha";
|
||||
autoUpdater.updateConfigPath = path.join(
|
||||
__dirname,
|
||||
"../../dev-app-update.yml",
|
||||
);
|
||||
autoUpdater.forceDevUpdateConfig = true;
|
||||
//autoUpdater.autoDownload = false;
|
||||
}
|
||||
// if (import.meta.env.DEV) {
|
||||
// // Useful for some dev/debugging tasks, but download can
|
||||
// // not be validated becuase dev app is not signed
|
||||
// autoUpdater.channel = "alpha";
|
||||
// autoUpdater.updateConfigPath = path.join(
|
||||
// __dirname,
|
||||
// "../../dev-app-update.yml",
|
||||
// );
|
||||
// autoUpdater.forceDevUpdateConfig = true;
|
||||
// //autoUpdater.autoDownload = false;
|
||||
// }
|
||||
|
||||
autoUpdater.on("checking-for-update", () => {
|
||||
log.info("Checking for update...");
|
||||
@@ -412,11 +423,6 @@ app.whenReady().then(async () => {
|
||||
mainWindow?.webContents.send(ipcTypes.toRenderer.updates.downloaded, info);
|
||||
});
|
||||
|
||||
autoUpdater.checkForUpdatesAndNotify({
|
||||
title: "Shop Partner Update",
|
||||
body: "A new version of Shop Partner is available. Click to update.",
|
||||
});
|
||||
|
||||
//The update itself will run when the bodyshop record is queried to know what release channel to use.
|
||||
createWindow();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user