@@ -3843,12 +3843,9 @@ function RemoteFunctions(config = {}) {
38433843 }
38443844
38453845 // if element is not editable and user clicks on it, then we show a toast notification saying
3846- // that this element is not editable (unless user dismissed it permanently)
3846+ // that this element is not editable
38473847 if ( ! element . hasAttribute ( "data-brackets-id" ) ) {
3848- const hideToast = localStorage . getItem ( 'phoenix-hide-dynamic-toast' ) ;
3849- if ( ! hideToast ) {
3850- showToast ( config . strings . toastNotEditable ) ;
3851- }
3848+ showToast ( config . strings . toastNotEditable ) ;
38523849 }
38533850
38543851 // make sure that the element is actually visible to the user
@@ -4592,27 +4589,6 @@ function RemoteFunctions(config = {}) {
45924589 animation: slideUp 0.3s ease-out !important;
45934590 }
45944591
4595- .toast-message {
4596- margin-bottom: 6px !important;
4597- }
4598-
4599- .toast-button {
4600- background: none !important;
4601- border: none !important;
4602- color: #A0A0A0 !important;
4603- cursor: pointer !important;
4604- font-size: 12px !important;
4605- font-family: Arial, sans-serif !important;
4606- text-decoration: none !important;
4607- pointer-events: auto !important;
4608- transition: opacity 0.2s !important;
4609- }
4610-
4611- .toast-button:hover {
4612- opacity: 0.8 !important;
4613- text-decoration: underline !important;
4614- }
4615-
46164592 @keyframes slideUp {
46174593 from {
46184594 opacity: 0;
@@ -4628,34 +4604,19 @@ function RemoteFunctions(config = {}) {
46284604 const content = `
46294605 <div class="toast-container">
46304606 <div class="toast-message">${ message } </div>
4631- <button class="toast-button">${ config . strings . toastDontShowAgain } </button>
46324607 </div>
46334608 ` ;
46344609
46354610 shadow . innerHTML = `<style>${ styles } </style>${ content } ` ;
46364611 window . document . body . appendChild ( toast ) ;
46374612
4638- // add click handler to "Don't show again" button
4639- const button = shadow . querySelector ( '.toast-button' ) ;
4640- button . addEventListener ( 'click' , ( ) => {
4641- // save to localStorage to never show again and close toast rn
4642- localStorage . setItem ( 'phoenix-hide-dynamic-toast' , 'true' ) ;
4643- if ( toast && toast . parentNode ) {
4644- toast . remove ( ) ;
4645- }
4646- if ( _toastTimeout ) {
4647- clearTimeout ( _toastTimeout ) ;
4648- _toastTimeout = null ;
4649- }
4650- } ) ;
4651-
4652- // Auto-dismiss after 6 seconds
4613+ // Auto-dismiss after 3 seconds
46534614 _toastTimeout = setTimeout ( ( ) => {
46544615 if ( toast && toast . parentNode ) {
46554616 toast . remove ( ) ;
46564617 }
46574618 _toastTimeout = null ;
4658- } , 6000 ) ;
4619+ } , 3000 ) ;
46594620 }
46604621
46614622 /**
0 commit comments