mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-14 23:31:00 +00:00
feat(clients): add top-level Clients tab and CRUD API
Adds /panel/api/clients endpoints (list, get, add, update, del, attach, detach) backed by ClientService methods that orchestrate the per-inbound Add/Update/Del flows so a single client row is created once and attached to many inbounds in one operation. The frontend gains a dedicated Clients page (frontend/clients.html + src/pages/clients/) with an AntD table, multi-inbound attach modal, and full CRUD. Axios interceptor learns to honour Content-Type: application/json so the JSON endpoints work alongside the legacy form-encoded ones. The legacy per-inbound client modal stays untouched in this PR — both flows now write to the same source of truth. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,7 @@ func (a *XUIController) initRouter(g *gin.RouterGroup) {
|
||||
|
||||
g.GET("/", a.index)
|
||||
g.GET("/inbounds", a.inbounds)
|
||||
g.GET("/clients", a.clients)
|
||||
g.GET("/nodes", a.nodes)
|
||||
g.GET("/settings", a.settings)
|
||||
g.GET("/xray", a.xraySettings)
|
||||
@@ -62,6 +63,10 @@ func (a *XUIController) inbounds(c *gin.Context) {
|
||||
serveDistPage(c, "inbounds.html")
|
||||
}
|
||||
|
||||
func (a *XUIController) clients(c *gin.Context) {
|
||||
serveDistPage(c, "clients.html")
|
||||
}
|
||||
|
||||
// nodes renders the multi-panel nodes management page.
|
||||
func (a *XUIController) nodes(c *gin.Context) {
|
||||
serveDistPage(c, "nodes.html")
|
||||
|
||||
Reference in New Issue
Block a user