Add the ability to pick the tray icon

This commit is contained in:
smartfrigde 2022-05-22 16:46:18 +02:00
parent 5e132564aa
commit b025948d90
2 changed files with 2 additions and 1 deletions

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -25,7 +25,8 @@ app.whenReady().then(async () => {
tray.setToolTip("Discord");
tray.setContextMenu(contextMenu);
} else {
tray = new Tray(path.join(__dirname, "../", "/assets/ac_plug.png"));
var trayIcon = await getConfig("trayIcon") ?? "ac_plug_colored";
tray = new Tray(path.join(__dirname, "../", `/assets/${trayIcon}.png`));
const contextMenu = Menu.buildFromTemplate([
{
label: "ArmCord"