Skip to content

Commit f5d9dc6

Browse files
simonhampgithub-actions[bot]
authored andcommitted
Build plugin
1 parent 7f58f5a commit f5d9dc6

File tree

1 file changed

+5
-13
lines changed
  • resources/js/electron-plugin/dist/server/api

1 file changed

+5
-13
lines changed

resources/js/electron-plugin/dist/server/api/menuBar.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import express from "express";
2-
import { Menu, Tray } from "electron";
2+
import { app, Menu, Tray } from "electron";
33
import { compileMenu } from "./helper/index.js";
44
import state from "../state.js";
55
import { menubar } from "menubar";
@@ -46,18 +46,10 @@ router.post("/create", (req, res) => {
4646
if (onlyShowContextMenu) {
4747
const tray = new Tray(icon || state.icon.replace("icon.png", "IconTemplate.png"));
4848
tray.setContextMenu(buildMenu(contextMenu));
49-
state.activeMenuBar = menubar({
50-
tray,
51-
tooltip,
52-
index: false,
53-
showDockIcon,
54-
showOnAllWorkspaces: false,
55-
browserWindow: {
56-
show: false,
57-
width: 0,
58-
height: 0,
59-
}
60-
});
49+
tray.setToolTip(tooltip);
50+
if (!showDockIcon) {
51+
app.dock.hide();
52+
}
6153
}
6254
else {
6355
state.activeMenuBar = menubar({

0 commit comments

Comments
 (0)