@@ -10,6 +10,12 @@ const path_1 = require("path");
10
10
const utils_1 = require ( "../utils" ) ;
11
11
const router = express_1 . default . Router ( ) ;
12
12
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
+ } ) ;
13
19
router . post ( '/resize' , ( req , res ) => {
14
20
var _a ;
15
21
const { id, width, height } = req . body ;
@@ -50,7 +56,7 @@ router.post('/always-on-top', (req, res) => {
50
56
res . sendStatus ( 200 ) ;
51
57
} ) ;
52
58
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 ;
54
60
if ( state_1 . default . windows [ id ] ) {
55
61
state_1 . default . windows [ id ] . show ( ) ;
56
62
state_1 . default . windows [ id ] . focus ( ) ;
@@ -81,7 +87,8 @@ router.post('/open', (req, res) => {
81
87
sandbox : false ,
82
88
contextIsolation : false ,
83
89
nodeIntegration : true ,
84
- } } ) ) ;
90
+ } , fullscreen,
91
+ kiosk } ) ) ;
85
92
if ( ( process . env . NODE_ENV === 'development' || showDevTools === true ) && showDevTools !== false ) {
86
93
window . webContents . openDevTools ( ) ;
87
94
}
0 commit comments