Skip to content

Commit

Permalink
Merge pull request #14 from bbredewold/main
Browse files Browse the repository at this point in the history
Add endpoint to update the context-menu
  • Loading branch information
mpociot committed Sep 21, 2023
2 parents b3982a6 + fa3a5aa commit 94ce1d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dist/server/api/menuBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ router.post("/label", (req, res) => {
const { label } = req.body;
state_1.default.activeMenuBar.tray.setTitle(label);
});
router.post("/context-menu", (req, res) => {
res.sendStatus(200);
const { contextMenu } = req.body;
state_1.default.activeMenuBar.tray.setContextMenu(buildMenu(contextMenu));
});
router.post("/show", (req, res) => {
res.sendStatus(200);
state_1.default.activeMenuBar.showWindow();
Expand Down
7 changes: 7 additions & 0 deletions src/server/api/menuBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ router.post("/label", (req, res) => {
state.activeMenuBar.tray.setTitle(label);
});

router.post("/context-menu", (req, res) => {
res.sendStatus(200);
const { contextMenu } = req.body;

state.activeMenuBar.tray.setContextMenu(buildMenu(contextMenu));
});

router.post("/show", (req, res) => {
res.sendStatus(200);

Expand Down

0 comments on commit 94ce1d2

Please sign in to comment.