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

Commit 49e0f04

Browse files
authored
Make traffic light position editable for browser window (#28)
* Make traffic light position editable for browser window * Build js file
1 parent 479c50c commit 49e0f04

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

dist/server/api/window.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ router.post('/position', (req, res) => {
2929
res.sendStatus(200);
3030
});
3131
router.post('/reload', (req, res) => {
32-
var _a;
33-
const { id } = req.body;
34-
(_a = state_1.default.windows[id]) === null || _a === void 0 ? void 0 : _a.reload();
35-
res.sendStatus(200);
32+
var _a;
33+
const { id } = req.body;
34+
(_a = state_1.default.windows[id]) === null || _a === void 0 ? void 0 : _a.reload();
35+
res.sendStatus(200);
3636
});
3737
router.post('/close', (req, res) => {
3838
const { id } = req.body;
@@ -69,7 +69,7 @@ router.post('/always-on-top', (req, res) => {
6969
res.sendStatus(200);
7070
});
7171
router.post('/open', (req, res) => {
72-
let { id, x, y, frame, width, height, minWidth, minHeight, maxWidth, maxHeight, focusable, hasShadow, url, resizable, movable, minimizable, maximizable, closable, title, alwaysOnTop, titleBarStyle, vibrancy, backgroundColor, transparency, showDevTools, fullscreen, kiosk, autoHideMenuBar, } = req.body;
72+
let { id, x, y, frame, width, height, minWidth, minHeight, maxWidth, maxHeight, focusable, hasShadow, url, resizable, movable, minimizable, maximizable, closable, title, alwaysOnTop, titleBarStyle, trafficLightPosition, vibrancy, backgroundColor, transparency, showDevTools, fullscreen, kiosk, autoHideMenuBar, } = req.body;
7373
if (state_1.default.windows[id]) {
7474
state_1.default.windows[id].show();
7575
state_1.default.windows[id].focus();
@@ -93,6 +93,7 @@ router.post('/open', (req, res) => {
9393
closable,
9494
hasShadow,
9595
titleBarStyle,
96+
trafficLightPosition,
9697
vibrancy,
9798
focusable,
9899
autoHideMenuBar }, (process.platform === 'linux' ? { icon: state_1.default.icon } : {})), { webPreferences: {

src/server/api/window.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ router.post('/open', (req, res) => {
102102
title,
103103
alwaysOnTop,
104104
titleBarStyle,
105+
trafficLightPosition,
105106
vibrancy,
106107
backgroundColor,
107108
transparency,
@@ -151,6 +152,7 @@ router.post('/open', (req, res) => {
151152
closable,
152153
hasShadow,
153154
titleBarStyle,
155+
trafficLightPosition,
154156
vibrancy,
155157
focusable,
156158
autoHideMenuBar,

0 commit comments

Comments
 (0)