feat: add Check for Updates to tray menu
All checks were successful
Build & Release / build (push) Successful in 2m26s
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:
parent
7662f00723
commit
f9b7a9739f
2 changed files with 9 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import macOsTrayIconAsset from "../../assets/desktop/iconTemplate.png?asset";
|
||||||
import { version } from "../../package.json";
|
import { version } from "../../package.json";
|
||||||
|
|
||||||
import { mainWindow, quitApp } from "./window";
|
import { mainWindow, quitApp } from "./window";
|
||||||
|
import { checkForUpdates } from "./updater";
|
||||||
|
|
||||||
// internal tray state
|
// internal tray state
|
||||||
let tray: Tray = null;
|
let tray: Tray = null;
|
||||||
|
|
@ -52,6 +53,11 @@ export function updateTrayMenu() {
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Check for Updates",
|
||||||
|
type: "normal",
|
||||||
|
click: () => checkForUpdates(),
|
||||||
|
},
|
||||||
{ type: "separator" },
|
{ type: "separator" },
|
||||||
{
|
{
|
||||||
label: mainWindow.isVisible() ? "Hide App" : "Show App",
|
label: mainWindow.isVisible() ? "Hide App" : "Show App",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Notification, app } from "electron";
|
import { Notification, app, ipcMain } from "electron";
|
||||||
import { exec } from "child_process";
|
import { exec } from "child_process";
|
||||||
import { createWriteStream, mkdirSync } from "fs";
|
import { createWriteStream, mkdirSync } from "fs";
|
||||||
import { dirname, join } from "path";
|
import { dirname, join } from "path";
|
||||||
|
|
@ -6,6 +6,8 @@ import { tmpdir } from "os";
|
||||||
import { pipeline } from "stream/promises";
|
import { pipeline } from "stream/promises";
|
||||||
import { Readable } from "stream";
|
import { Readable } from "stream";
|
||||||
|
|
||||||
|
ipcMain.handle("checkForUpdates", () => checkForUpdates());
|
||||||
|
|
||||||
const RELEASES_URL =
|
const RELEASES_URL =
|
||||||
"https://git.mithraic.cloud/api/v1/repos/ad3laid3/sanctum/releases/latest";
|
"https://git.mithraic.cloud/api/v1/repos/ad3laid3/sanctum/releases/latest";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue