@@ -406,10 +406,44 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE
406
406
this . root = parent ;
407
407
408
408
const overlay = append ( this . root , $ ( '.overlay' ) ) ;
409
+
409
410
const overlayBackgroundColor = this . getColor ( SIDE_BAR_DRAG_AND_DROP_BACKGROUND ) ?? '' ;
410
411
overlay . style . backgroundColor = overlayBackgroundColor ;
411
412
hide ( overlay ) ;
412
413
414
+ // NOTE@coder this UI element helps users understand the extension marketplace divergence
415
+ const extensionHelperLocalStorageKey = 'coder.extension-help-message' ;
416
+
417
+ if ( localStorage . getItem ( extensionHelperLocalStorageKey ) === null ) {
418
+ const helperHeader = append ( this . root , $ ( '.header' ) ) ;
419
+ helperHeader . id = 'codeServerMarketplaceHelper' ;
420
+ helperHeader . style . height = 'auto' ;
421
+ helperHeader . style . fontWeight = '600' ;
422
+ helperHeader . style . padding = 'padding: 5px 16px' ;
423
+ helperHeader . style . position = 'relative' ;
424
+ helperHeader . innerHTML = `
425
+ <div style="margin-bottom: 8px;">
426
+ <p style="margin-bottom: 0; display: flex; align-items: center"><span class="codicon codicon-warning" style="margin-right: 2px; color: #C4A103"></span>WARNING</p>
427
+ <p style="margin-top: 0; margin-bottom: 4px">
428
+ These extensions are not official. Find open-source extensions
429
+ <a href="https://open-vsx.org/" target="_blank">here</a>.
430
+ See <a href="https://github.com/cdr/code-server/blob/master/doc/FAQ.md#differences-compared-to-vs-code" target="_blank">docs</a>.
431
+ </p>
432
+ </div>
433
+ ` ;
434
+
435
+ const dismiss = append ( helperHeader , $ ( 'span' ) ) ;
436
+ dismiss . innerHTML = 'Dismiss' ;
437
+ dismiss . style . display = 'block' ;
438
+ dismiss . style . textAlign = 'right' ;
439
+ dismiss . style . cursor = 'pointer' ;
440
+ dismiss . onclick = ( ) => {
441
+ // Eventually removes helperHeader from DOM
442
+ setTimeout ( ( ) => this . root ?. removeChild ( helperHeader ) ) ;
443
+ localStorage . setItem ( extensionHelperLocalStorageKey , 'viewed' ) ;
444
+ } ;
445
+ }
446
+
413
447
const header = append ( this . root , $ ( '.header' ) ) ;
414
448
const placeholder = localize ( 'searchExtensions' , "Search Extensions in Marketplace" ) ;
415
449
const searchValue = this . searchViewletState [ 'query.value' ] ? this . searchViewletState [ 'query.value' ] : '' ;
0 commit comments