(feat): migrate bun to pnpm
Some checks failed
/ build-web (push) Failing after 3m41s
/ build-desktop (linux) (push) Failing after 3m43s
/ build-mobile (push) Failing after 6m33s
/ release (push) Has been skipped

(feat): some mtp stuff
(wip): electron app tray
This commit is contained in:
Alois 2026-07-04 01:18:54 +02:00
commit 82a483d7ab
39 changed files with 10109 additions and 2429 deletions

View file

@ -15,6 +15,7 @@ import {
type DesktopScreenShareAudioOutput,
type DesktopScreenShareCapabilities,
} from "../shared/ipc.js";
import { initTray } from "./tray.js";
const __dirname = dirname(fileURLToPath(import.meta.url));
const verbose = process.argv.includes("--verbose");
@ -310,6 +311,7 @@ async function start() {
verboseLog("app ready");
registerIpc();
registerDisplayMediaHandler();
initTray();
await createWindow();
}

View file

@ -0,0 +1,25 @@
import { Tray, Menu } from "electron";
import path from "node:path";
import { fileURLToPath } from "node:url";
let tray: Tray | null = null;
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export function initTray() {
const iconPath = path.join(__dirname, "../../build/icons/32x32.png");
tray = new Tray(iconPath); // keep reference alive
const contextMenu = Menu.buildFromTemplate([
{ label: "Restart", type: "normal" },
{ label: "Quit", type: "normal" },
]);
tray.setContextMenu(contextMenu);
tray.on("click", (event) => {
console.log(event);
})
}