feat: add Check for Updates to tray menu
All checks were successful
Build & Release / build (push) Successful in 2m26s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
MiTHRAL 2026-04-21 15:35:40 -04:00
parent 7662f00723
commit f9b7a9739f
2 changed files with 9 additions and 1 deletions

View file

@ -5,6 +5,7 @@ import macOsTrayIconAsset from "../../assets/desktop/iconTemplate.png?asset";
import { version } from "../../package.json";
import { mainWindow, quitApp } from "./window";
import { checkForUpdates } from "./updater";
// internal tray state
let tray: Tray = null;
@ -52,6 +53,11 @@ export function updateTrayMenu() {
},
]),
},
{
label: "Check for Updates",
type: "normal",
click: () => checkForUpdates(),
},
{ type: "separator" },
{
label: mainWindow.isVisible() ? "Hide App" : "Show App",

View file

@ -1,4 +1,4 @@
import { Notification, app } from "electron";
import { Notification, app, ipcMain } from "electron";
import { exec } from "child_process";
import { createWriteStream, mkdirSync } from "fs";
import { dirname, join } from "path";
@ -6,6 +6,8 @@ import { tmpdir } from "os";
import { pipeline } from "stream/promises";
import { Readable } from "stream";
ipcMain.handle("checkForUpdates", () => checkForUpdates());
const RELEASES_URL =
"https://git.mithraic.cloud/api/v1/repos/ad3laid3/sanctum/releases/latest";