Browse Source

spin only in reload time

Co-Authored-By: Alireza Ahmadi <[email protected]>
MHSanaei 1 year ago
parent
commit
9a89d7bfab
2 changed files with 4 additions and 2 deletions
  1. 3 1
      web/html/xui/inbounds.html
  2. 1 1
      xray/inbound.go

+ 3 - 1
web/html/xui/inbounds.html

@@ -343,7 +343,9 @@
                     return;
                 }
                 this.setInbounds(msg.obj);
-                this.refreshing = false;
+                setTimeout(() => {
+                    this.refreshing = false;
+                }, 500);
             },
             async getDefaultSettings() {
                 const msg = await HttpUtil.post('/panel/setting/defaultSettings');

+ 1 - 1
xray/inbound.go

@@ -6,7 +6,7 @@ import (
 )
 
 type InboundConfig struct {
-	Listen         json_util.RawMessage `json:"listen"` // listen 不能为空字符串
+	Listen         json_util.RawMessage `json:"listen"` // listen cannot be an empty string
 	Port           int                  `json:"port"`
 	Protocol       string               `json:"protocol"`
 	Settings       json_util.RawMessage `json:"settings"`