소스 검색

Update index.html

AY Windows Host 3 년 전
부모
커밋
c1e05108b1
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      web/SystemAO/updates/index.html

+ 7 - 3
web/SystemAO/updates/index.html

@@ -292,6 +292,7 @@
             var wsroot = ao_module_utils.getWebSocketEndpoint();
             var requestEndpoint = wsroot + `/system/update/download?webpack=${webpackDownloadURL}&binary=${binaryDownloadURL}&checksum=${checksumDownloadURL}&ws=true`
             console.log("Connecting to: ", requestEndpoint);
+            var isFailed = false;
 
             hideAllStatus();
             $("#downloading").slideDown("fast");
@@ -309,6 +310,7 @@
                     hideAllStatus();
                     $("#failed").slideDown();
                     $("#failedErrorMessage").text(status.error);
+                    isFailed = true
                 } else {
                     //Progressing
                     let progressText = status.Progress.toFixed(2) + "%";
@@ -320,9 +322,11 @@
             };
 
             socket.onclose = function(event) {
-                hideAllStatus();
-                $("#success").slideDown();
-                checkLauncher();
+                if(!isFailed){
+                    hideAllStatus();
+                    $("#success").slideDown();
+                    checkLauncher();
+                }
             };
 
             socket.onerror = function(error) {