Kaynağa Gözat

Some final touch on the connection lost message

TC pushbot 5 4 yıl önce
ebeveyn
işleme
6635543551
1 değiştirilmiş dosya ile 9 ekleme ve 0 silme
  1. 9 0
      web/desktop.system

+ 9 - 0
web/desktop.system

@@ -1030,7 +1030,16 @@
         function handleManualCheckReconnect(button){
             $(button).addClass("loading");
             checkConnection(undefined, function(status){
+                let oldText = $(button).text();
                 $(button).removeClass("loading");
+                if (status == false){
+                    //Still unable to connect. Show cross icon
+                    $(button).html(`<i class="remove icon"></i>`);
+                    setTimeout(function(){
+                        //Restore its original text after 5 sec
+                        $(button).text(oldText);
+                    }, 5000);
+                }
             });
         }