mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-09-10 05:45:04 +02:00
20 lines
409 B
JavaScript
20 lines
409 B
JavaScript
const { Tray } = require("electron");
|
|
const { getMenu } = require("./menu");
|
|
const trayModule = {};
|
|
let tray;
|
|
|
|
trayModule.addTray = function(options = { icon: "" }) {
|
|
tray = new Tray(options.icon);
|
|
};
|
|
|
|
trayModule.refreshTray = function() {
|
|
tray.on("click", function(e) {
|
|
// do nothing on click
|
|
});
|
|
|
|
tray.setToolTip("Tidal-hifi");
|
|
tray.setContextMenu(getMenu());
|
|
};
|
|
|
|
module.exports = trayModule;
|