File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,11 @@ define([
8888 top : colabHeaderHeight + 'px'
8989 } ) ;
9090 } ) ;
91+ } else if ( vpConfig . extensionType === 'lab' || vpConfig . extensionType === 'lite' ) {
92+ $ ( '#vp_protectorShowWithoutKernel' ) . click ( function ( evt ) {
93+ // just hide protector
94+ vpConfig . hideProtector ( ) ;
95+ } ) ;
9196 }
9297
9398 window . vpEvent = new com_Event ( this ) ;
@@ -250,6 +255,19 @@ define([
250255 { vp_note_display : vp_note_display , vp_note_width : vp_note_width } ,
251256 { parent : this }
252257 ) ;
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+ }
253271
254272 // consider height and width
255273 this . _resizeWindow ( ) ;
You can’t perform that action at this time.
0 commit comments