File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,11 @@ define([
88
88
top : colabHeaderHeight + 'px'
89
89
} ) ;
90
90
} ) ;
91
+ } else if ( vpConfig . extensionType === 'lab' || vpConfig . extensionType === 'lite' ) {
92
+ $ ( '#vp_protectorShowWithoutKernel' ) . click ( function ( evt ) {
93
+ // just hide protector
94
+ vpConfig . hideProtector ( ) ;
95
+ } ) ;
91
96
}
92
97
93
98
window . vpEvent = new com_Event ( this ) ;
@@ -250,6 +255,19 @@ define([
250
255
{ vp_note_display : vp_note_display , vp_note_width : vp_note_width } ,
251
256
{ parent : this }
252
257
) ;
258
+
259
+ // load protector for jupyterlite
260
+ if ( vpConfig . extensionType === 'lab' || vpConfig . extensionType === 'lite' ) {
261
+ $ ( '#vp_wrapper' ) . append ( `<div id="vp_protector" class="vp-protector">
262
+ <div class="vp-protector-info">
263
+ <div class="vp-protector-title">No kernel</div>
264
+ <div class="vp-protector-content">You have to open the notebook or console to use Visual Python.</div>
265
+ <div class="vp-protector-footer">
266
+ <button id="vp_protectorShowWithoutKernel" class="vp-button cancel">Show without Kernel</button>
267
+ </div>
268
+ </div>
269
+ </div>` )
270
+ }
253
271
254
272
// consider height and width
255
273
this . _resizeWindow ( ) ;
You can’t perform that action at this time.
0 commit comments