@@ -122,6 +122,8 @@ define(function (require, exports, module) {
122122 $firefoxButtonBallast ,
123123 $panelTitle ;
124124
125+ let customLivePreviewBannerShown = false ;
126+
125127 StaticServer . on ( EVENT_EMBEDDED_IFRAME_WHO_AM_I , function ( ) {
126128 if ( $iframe && $iframe [ 0 ] ) {
127129 const iframeDom = $iframe [ 0 ] ;
@@ -398,6 +400,14 @@ define(function (require, exports, module) {
398400 $firefoxButtonBallast = $panel . find ( "#firefoxButtonBallast" ) ;
399401 $panelTitle = $panel . find ( "#panel-live-preview-title" ) ;
400402 $settingsIcon = $panel . find ( "#livePreviewSettingsBtn" ) ;
403+
404+ $panel . find ( ".live-preview-settings-banner-btn" ) . on ( "click" , ( ) => {
405+ CommandManager . execute ( Commands . FILE_LIVE_FILE_PREVIEW_SETTINGS ) ;
406+ Metrics . countEvent ( Metrics . EVENT_TYPE . LIVE_PREVIEW , "settingsBtnBanner" , "click" ) ;
407+ } ) ;
408+ $panel . find ( ".custom-server-banner-close-icon" ) . on ( "click" , ( ) => {
409+ $panel . find ( ".live-preview-custom-banner" ) . addClass ( "forced-hidden" ) ;
410+ } ) ;
401411 $iframe [ 0 ] . onload = function ( ) {
402412 $iframe . attr ( 'srcdoc' , null ) ;
403413 } ;
@@ -492,6 +502,15 @@ define(function (require, exports, module) {
492502 _setTitle ( relativeOrFullPath , currentPreviewFile ,
493503 previewDetails . isCustomServer ? currentLivePreviewURL : "" ) ;
494504 if ( panel . isVisible ( ) ) {
505+ if ( ! customLivePreviewBannerShown && LivePreviewSettings . isUsingCustomServer ( )
506+ && previewDetails . isCustomServer ) {
507+ customLivePreviewBannerShown = true ;
508+ $panel . find ( ".live-preview-custom-banner" ) . removeClass ( "forced-hidden" ) ;
509+ $panel . find ( ".live-preview-banner-message" ) . text (
510+ StringUtils . format ( Strings . LIVE_PREVIEW_CUSTOM_SERVER_BANNER ,
511+ LivePreviewSettings . getCustomServeBaseURL ( ) )
512+ ) ;
513+ }
495514 let newIframe = $ ( LIVE_PREVIEW_IFRAME_HTML ) ;
496515 newIframe . insertAfter ( $iframe ) ;
497516 $iframe . remove ( ) ;
@@ -556,6 +575,7 @@ define(function (require, exports, module) {
556575 }
557576
558577 async function _projectOpened ( _evt ) {
578+ customLivePreviewBannerShown = false ;
559579 _openReadmeMDIfFirstTime ( ) ;
560580 _customServerMetrics ( ) ;
561581 if ( ! LiveDevelopment . isActive ( )
0 commit comments