@@ -821,9 +821,14 @@ function fetchChangelog(startTime) {
821821function ShowLatestChangelog (e ) {
822822 if (e) e .preventDefault ();
823823
824- // If the modal already exists, clear its content to force a fresh fetch.
824+ // Define the loading message
825+ var loadingMessage = ' <p>Please wait and allow up to 10 seconds for the changelog to load.<br>' +
826+ ' Click on "Cancel" button to stop and exit this dialog.</p>' ;
827+
828+ // If the modal already exists, update its content for a fresh fetch.
825829 if ($ (' #changelogModal' ).length ) {
826- $ (' #changelogData' ).html (' <p>Please wait...</p>' );
830+ $ (' #changelogData' ).html (loadingMessage);
831+ $ (' #closeChangelogModal' ).text (" Cancel" );
827832 } else {
828833 // Create modal overlay if it doesn't exist
829834 $ (' body' ).append (
@@ -832,9 +837,9 @@ function ShowLatestChangelog(e) {
832837 ' <div id="changelogContent" style="position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); ' +
833838 ' background:#fff; color:#000; padding:20px; max-height:90%; overflow:auto; width:80%; max-width:800px;">' +
834839 ' <h2 style="margin-top:0; color:#000;">Latest Changelog</h2>' +
835- ' <button id="closeChangelogModal" style="float:right; font-size:14px; cursor:pointer;">Close </button>' +
840+ ' <button id="closeChangelogModal" style="float:right; font-size:14px; cursor:pointer;">Cancel </button>' +
836841 ' <div id="changelogData" style="font-family:monospace; white-space:pre-wrap; margin-top:10px; color:#000;">' +
837- ' <p>Please wait and allow up to 10 seconds for changelog to load...</p> ' +
842+ loadingMessage +
838843 ' </div>' +
839844 ' </div>' +
840845 ' </div>'
@@ -864,6 +869,8 @@ function ShowLatestChangelog(e) {
864869 var startTime = new Date ().getTime ();
865870 setTimeout (function () {
866871 fetchChangelog (startTime);
872+ // Once the changelog has loaded, update the button text to "Close"
873+ $ (' #closeChangelogModal' ).text (" Close" );
867874 }, 8000 );
868875
869876 return false ;
0 commit comments