This repository was archived by the owner on Jul 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +19
-1
lines changed Expand file tree Collapse file tree 5 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,6 @@ process.argv.shift()
15
15
// insert 'kubectl' into argv
16
16
process . argv . splice ( 1 , 0 , 'kubectl' )
17
17
18
+ process . env . KUI_POPUP_WINDOW_RESIZE = true
19
+
18
20
require ( '@kui-shell/core' ) . main ( process . argv )
Original file line number Diff line number Diff line change @@ -209,6 +209,7 @@ function mac {
209
209
210
210
(cd " $BUILDDIR /${CLIENT_NAME} -darwin-x64" && touch kubectl-kui && chmod +x kubectl-kui \
211
211
&& echo ' #!/usr/bin/env sh
212
+ export KUI_POPUP_WINDOW_RESIZE=true
212
213
SCRIPTDIR=$(cd $(dirname "$0") && pwd)
213
214
"$SCRIPTDIR"/Kui.app/Contents/MacOS/Kui kubectl $@ &' >> kubectl-kui)
214
215
@@ -261,6 +262,7 @@ function linux {
261
262
262
263
(cd " $BUILDDIR /${CLIENT_NAME} -linux-x64" && touch kubectl-kui && chmod +x kubectl-kui \
263
264
&& echo ' #!/usr/bin/env sh
265
+ export KUI_POPUP_WINDOW_RESIZE=true
264
266
SCRIPTDIR=$(cd $(dirname "$0") && pwd)
265
267
"$SCRIPTDIR"/Kui kubectl $@ &' >> kubectl-kui)
266
268
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ debug('loading')
20
20
21
21
import { IpcMainEvent , Rectangle } from 'electron'
22
22
23
- import windowDefaults from '../webapp/defaults'
23
+ import windowDefaults , { popupWindowDefaults } from '../webapp/defaults'
24
24
import ISubwindowPrefs from '../models/SubwindowPrefs'
25
25
26
26
/**
@@ -427,6 +427,14 @@ export const getCommand = (argv: string[]): Command => {
427
427
argv = JSON . parse ( process . env . KUI_POPUP )
428
428
}
429
429
430
+ if ( process . env . KUI_POPUP_WINDOW_RESIZE ) {
431
+ subwindowPrefs = {
432
+ fullscreen : true ,
433
+ width : popupWindowDefaults . width ,
434
+ height : popupWindowDefaults . height
435
+ }
436
+ }
437
+
430
438
debug ( 'using args' , argv , subwindowPrefs )
431
439
return { argv, subwindowPlease, subwindowPrefs }
432
440
}
Original file line number Diff line number Diff line change @@ -22,3 +22,8 @@ export default {
22
22
width : 1200 ,
23
23
height : 800
24
24
}
25
+
26
+ export const popupWindowDefaults = {
27
+ width : 672 ,
28
+ height : 730
29
+ }
Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ const prepareElectron = (popup: string[]) => {
191
191
if ( popup ) {
192
192
// used in spawn-electron.ts
193
193
opts . env [ 'KUI_POPUP' ] = JSON . stringify ( popup )
194
+ opts . env [ 'KUI_POPUP_WINDOW_RESIZE' ] = 'true'
194
195
}
195
196
196
197
return new Application ( opts )
You can’t perform that action at this time.
0 commit comments