mhsanaei 2 weeks ago
parent
commit
2eb9d2e2e8

+ 43 - 8
.vscode/tasks.json

@@ -5,36 +5,71 @@
       "label": "go: build",
       "type": "shell",
       "command": "go",
-      "args": ["build", "-o", "bin/3x-ui.exe", "./main.go"],
+      "args": [
+        "build",
+        "-o",
+        "bin/3x-ui.exe",
+        "./main.go"
+      ],
       "options": {
         "cwd": "${workspaceFolder}"
       },
-      "problemMatcher": ["$go"],
-      "group": { "kind": "build", "isDefault": true }
+      "problemMatcher": [
+        "$go"
+      ],
+      "group": {
+        "kind": "build",
+        "isDefault": true
+      }
     },
     {
       "label": "go: run",
       "type": "shell",
       "command": "go",
-      "args": ["run", "./main.go"],
+      "args": [
+        "run",
+        "./main.go"
+      ],
       "options": {
         "cwd": "${workspaceFolder}",
         "env": {
           "XUI_DEBUG": "true"
         }
       },
-      "problemMatcher": ["$go"]
+      "problemMatcher": [
+        "$go"
+      ]
     },
     {
       "label": "go: test",
       "type": "shell",
       "command": "go",
-      "args": ["test", "./..."],
+      "args": [
+        "test",
+        "./..."
+      ],
       "options": {
         "cwd": "${workspaceFolder}"
       },
-      "problemMatcher": ["$go"],
+      "problemMatcher": [
+        "$go"
+      ],
       "group": "test"
+    },
+    {
+      "label": "go: vet",
+      "type": "shell",
+      "command": "go",
+      "args": [
+        "vet",
+        "./..."
+      ],
+      "options": {
+        "cwd": "${workspaceFolder}"
+      },
+      "problemMatcher": [
+        "$go"
+      ]
     }
   ]
-}
+}

File diff suppressed because it is too large
+ 0 - 0
web/assets/ant-design-vue/antd.min.js.map


File diff suppressed because it is too large
+ 0 - 1
web/assets/axios/axios.min.js


File diff suppressed because it is too large
+ 0 - 0
web/assets/axios/axios.min.js.map


File diff suppressed because it is too large
+ 0 - 0
web/assets/moment/moment.min.js.map


File diff suppressed because it is too large
+ 2 - 2
web/assets/otpauth/otpauth.umd.min.js


File diff suppressed because it is too large
+ 0 - 0
web/assets/otpauth/otpauth.umd.min.js.map


+ 15 - 11
web/web.go

@@ -266,6 +266,11 @@ func (s *Server) initRouter() (*gin.Engine, error) {
 	s.panel = controller.NewXUIController(g)
 	s.api = controller.NewAPIController(g)
 
+	// Chrome DevTools endpoint for debugging web apps
+	engine.GET("/.well-known/appspecific/com.chrome.devtools.json", func(c *gin.Context) {
+		c.JSON(http.StatusOK, gin.H{})
+	})
+
 	// Add a catch-all route to handle undefined paths and return 404
 	engine.NoRoute(func(c *gin.Context) {
 		c.AbortWithStatus(http.StatusNotFound)
@@ -314,17 +319,16 @@ func (s *Server) startTask() {
 	// Run once a month, midnight, first of month
 	s.cron.AddJob("@monthly", job.NewPeriodicTrafficResetJob("monthly"))
 
-    // LDAP sync scheduling
-    if ldapEnabled, _ := s.settingService.GetLdapEnable(); ldapEnabled {
-        runtime, err := s.settingService.GetLdapSyncCron()
-        if err != nil || runtime == "" {
-            runtime = "@every 1m"
-        }
-        j := job.NewLdapSyncJob()
-        // job has zero-value services with method receivers that read settings on demand
-        s.cron.AddJob(runtime, j)
-    }
-
+	// LDAP sync scheduling
+	if ldapEnabled, _ := s.settingService.GetLdapEnable(); ldapEnabled {
+		runtime, err := s.settingService.GetLdapSyncCron()
+		if err != nil || runtime == "" {
+			runtime = "@every 1m"
+		}
+		j := job.NewLdapSyncJob()
+		// job has zero-value services with method receivers that read settings on demand
+		s.cron.AddJob(runtime, j)
+	}
 
 	// Make a traffic condition every day, 8:30
 	var entry cron.EntryID

Some files were not shown because too many files changed in this diff