@@ -2,6 +2,7 @@ let projectModified = false;
22let projectFilePath = "" ;
33let currentTheme = "dark" ;
44let syncActive = false ;
5+ let testDialogActive = false ;
56
67function log ( message , level ) {
78 const area = document . getElementById ( "log-area" ) ;
@@ -33,9 +34,12 @@ function closeModal() {
3334 document . getElementById ( "modal-overlay" ) . classList . add ( "hidden" ) ;
3435}
3536
36- document . getElementById ( "modal-close-btn" ) . addEventListener ( "click" , closeModal ) ;
37+ document . getElementById ( "modal-close-btn" ) . addEventListener ( "click" , function ( ) {
38+ if ( testDialogActive ) return ;
39+ closeModal ( ) ;
40+ } ) ;
3741document . getElementById ( "modal-overlay" ) . addEventListener ( "click" , function ( e ) {
38- if ( e . target === this ) closeModal ( ) ;
42+ if ( e . target === this && ! testDialogActive ) closeModal ( ) ;
3943} ) ;
4044
4145async function showInfo ( title , message ) {
@@ -164,6 +168,7 @@ window.runtime.EventsOn("close-confirm", function() {
164168} ) ;
165169
166170function showTestDialog ( count ) {
171+ testDialogActive = true ;
167172 showModal ( "Test Launch" ,
168173 '<div class="test-dialog-main">' +
169174 '<h2>Testing ' + count + ' mods</h2>' +
@@ -177,13 +182,16 @@ function showTestDialog(count) {
177182}
178183
179184function submitTestResult ( success ) {
185+ testDialogActive = false ;
180186 closeModal ( ) ;
181187 window . go . main . App . SubmitTestResult ( success ) ;
182188}
183189
184190async function cancelDebug ( ) {
185191 await window . go . main . App . CancelScan ( ) ;
192+ testDialogActive = false ;
186193 closeModal ( ) ;
194+ await updateUI ( ) ;
187195}
188196
189197// Theme
0 commit comments