diff --git a/resources/js/electron-plugin/dist/server/api/menuBar.js b/resources/js/electron-plugin/dist/server/api/menuBar.js index bdad214..e951f0b 100644 --- a/resources/js/electron-plugin/dist/server/api/menuBar.js +++ b/resources/js/electron-plugin/dist/server/api/menuBar.js @@ -87,6 +87,7 @@ router.post("/create", (req, res) => { } state.activeMenuBar.on("ready", () => { state.activeMenuBar.tray.setTitle(label); + res.sendStatus(200); state.activeMenuBar.on("hide", () => { notifyLaravel("events", { event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarHidden" @@ -138,7 +139,6 @@ router.post("/create", (req, res) => { }); }); }); - res.sendStatus(200); }); function buildMenu(contextMenu) { let menu = Menu.buildFromTemplate([{ role: "quit" }]); diff --git a/resources/js/electron-plugin/src/server/api/menuBar.ts b/resources/js/electron-plugin/src/server/api/menuBar.ts index ec65b2a..e2f651d 100644 --- a/resources/js/electron-plugin/src/server/api/menuBar.ts +++ b/resources/js/electron-plugin/src/server/api/menuBar.ts @@ -127,8 +127,11 @@ router.post("/create", (req, res) => { } state.activeMenuBar.on("ready", () => { + state.activeMenuBar.tray.setTitle(label); + res.sendStatus(200); + state.activeMenuBar.on("hide", () => { notifyLaravel("events", { event: "\\Native\\Laravel\\Events\\MenuBar\\MenuBarHidden" @@ -186,8 +189,6 @@ router.post("/create", (req, res) => { }); }); }); - - res.sendStatus(200); }); function buildMenu(contextMenu) {