Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit 0b21d88

Browse files
authored
Merge pull request #15 from metrique/window-position
2 parents ba81b43 + a154f0d commit 0b21d88

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

dist/server/api/menuBar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ router.post("/hide", (req, res) => {
2525
});
2626
router.post("/create", (req, res) => {
2727
res.sendStatus(200);
28-
const { width, height, url, label, alwaysOnTop, vibrancy, backgroundColor, transparency, icon, showDockIcon, onlyShowContextWindow, contextMenu } = req.body;
28+
const { width, height, url, label, alwaysOnTop, vibrancy, backgroundColor, transparency, icon, showDockIcon, onlyShowContextWindow, windowPosition, contextMenu } = req.body;
2929
if (onlyShowContextWindow === true) {
3030
const tray = new electron_1.Tray(icon || state_1.default.icon.replace("icon.png", "IconTemplate.png"));
3131
tray.setContextMenu(buildMenu(contextMenu));
@@ -47,6 +47,7 @@ router.post("/create", (req, res) => {
4747
index: url,
4848
showDockIcon,
4949
showOnAllWorkspaces: false,
50+
windowPosition: windowPosition !== null && windowPosition !== void 0 ? windowPosition : "trayCenter",
5051
browserWindow: {
5152
width,
5253
height,

src/server/api/menuBar.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ router.post("/create", (req, res) => {
4343
icon,
4444
showDockIcon,
4545
onlyShowContextWindow,
46+
windowPosition,
4647
contextMenu
4748
} = req.body;
4849

@@ -68,6 +69,7 @@ router.post("/create", (req, res) => {
6869
index: url,
6970
showDockIcon,
7071
showOnAllWorkspaces: false,
72+
windowPosition: windowPosition ?? "trayCenter",
7173
browserWindow: {
7274
width,
7375
height,

0 commit comments

Comments
 (0)