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

Commit dbfe4a0

Browse files
committed
wip
1 parent 3347bd0 commit dbfe4a0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

dist/server/api/window.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ const path_1 = require("path");
1010
const utils_1 = require("../utils");
1111
const router = express_1.default.Router();
1212
const electron_window_state_1 = __importDefault(require("electron-window-state"));
13+
router.post('/maximize', (req, res) => {
14+
var _a;
15+
const { id } = req.body;
16+
(_a = state_1.default.windows[id]) === null || _a === void 0 ? void 0 : _a.maximize();
17+
res.sendStatus(200);
18+
});
1319
router.post('/resize', (req, res) => {
1420
var _a;
1521
const { id, width, height } = req.body;
@@ -50,7 +56,7 @@ router.post('/always-on-top', (req, res) => {
5056
res.sendStatus(200);
5157
});
5258
router.post('/open', (req, res) => {
53-
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, } = req.body;
59+
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, } = req.body;
5460
if (state_1.default.windows[id]) {
5561
state_1.default.windows[id].show();
5662
state_1.default.windows[id].focus();
@@ -81,7 +87,8 @@ router.post('/open', (req, res) => {
8187
sandbox: false,
8288
contextIsolation: false,
8389
nodeIntegration: true,
84-
} }));
90+
}, fullscreen,
91+
kiosk }));
8592
if ((process.env.NODE_ENV === 'development' || showDevTools === true) && showDevTools !== false) {
8693
window.webContents.openDevTools();
8794
}

0 commit comments

Comments
 (0)