feat(sidebar): move Routing/Outbounds to top-level items with clean URLs

- Move Routing out of the Xray Configs submenu; add Routing and Outbounds
  as top-level sidebar items below Hosts
- Give them their own clean routes (/routing, /outbound) instead of
  /xray#routing and /xray#outbound, registered in the React router and the
  Go SPA shell so direct links and refresh work
- XrayPage derives the active section from the pathname for those routes
- Add menu.routing and menu.outbounds translation keys across all locales
This commit is contained in:
MHSanaei
2026-06-22 22:20:26 +02:00
parent 20094c8d35
commit 718b7e16e1
18 changed files with 39 additions and 7 deletions
+2
View File
@@ -40,6 +40,8 @@ func (a *XUIController) initRouter(g *gin.RouterGroup) {
g.GET("/nodes", a.panelSPA)
g.GET("/settings", a.panelSPA)
g.GET("/xray", a.panelSPA)
g.GET("/outbound", a.panelSPA)
g.GET("/routing", a.panelSPA)
g.GET("/api-docs", a.panelSPA)
// SPA pages built by Vite don't have a server-rendered <meta name="csrf-token">,
+2
View File
@@ -111,6 +111,8 @@
"nodes": "النودز",
"settings": "إعدادات اللوحة",
"xray": "إعدادات Xray",
"routing": "التوجيه",
"outbounds": "الصادرات",
"apiDocs": "توثيق API",
"logout": "تسجيل خروج",
"link": "إدارة",
+2
View File
@@ -112,6 +112,8 @@
"hosts": "Hosts",
"settings": "Panel Settings",
"xray": "Xray Configs",
"routing": "Routing",
"outbounds": "Outbounds",
"apiDocs": "API Docs",
"logout": "Log Out",
"link": "Manage",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "Nodos",
"settings": "Ajustes del panel",
"xray": "Configuración Xray",
"routing": "Enrutamiento",
"outbounds": "Salidas",
"apiDocs": "Documentación de la API",
"logout": "Cerrar Sesión",
"link": "Gestionar",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "نودها",
"settings": "تنظیمات پنل",
"xray": "پیکربندی Xray",
"routing": "مسیریابی",
"outbounds": "خروجی‌ها",
"apiDocs": "مستندات API",
"logout": "خروج",
"link": "مدیریت",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "Node",
"settings": "Pengaturan Panel",
"xray": "Konfigurasi Xray",
"routing": "Pengalihan",
"outbounds": "Outbound",
"apiDocs": "Dokumentasi API",
"logout": "Keluar",
"link": "Kelola",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "ノード",
"settings": "パネル設定",
"xray": "Xray 設定",
"routing": "ルーティング",
"outbounds": "アウトバウンド",
"apiDocs": "API ドキュメント",
"logout": "ログアウト",
"link": "リンク管理",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "Nós",
"settings": "Configurações do Painel",
"xray": "Configurações Xray",
"routing": "Roteamento",
"outbounds": "Saídas",
"apiDocs": "Documentação da API",
"logout": "Sair",
"link": "Gerenciar",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "Узлы",
"settings": "Настройки панели",
"xray": "Конфигурации Xray",
"routing": "Маршрутизация",
"outbounds": "Исходящие",
"apiDocs": "Документация API",
"logout": "Выход",
"link": "Управление",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "Düğümler",
"settings": "Panel Ayarları",
"xray": "Xray Yapılandırmaları",
"routing": "Yönlendirme",
"outbounds": "Giden Bağlantılar",
"apiDocs": "API Belgeleri",
"logout": "Çıkış Yap",
"link": "Yönet",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "Вузли",
"settings": "Налаштування панелі",
"xray": "Конфігурації Xray",
"routing": "Маршрутизація",
"outbounds": "Вихідні",
"apiDocs": "Документація API",
"logout": "Вийти",
"link": "Керувати",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "Nút",
"settings": "Cài đặt bảng điều khiển",
"xray": "Cấu hình Xray",
"routing": "Định tuyến",
"outbounds": "Outbound",
"apiDocs": "Tài liệu API",
"logout": "Đăng xuất",
"link": "Quản lý",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "节点",
"settings": "面板设置",
"xray": "Xray 配置",
"routing": "路由",
"outbounds": "出站",
"apiDocs": "API 文档",
"logout": "退出登录",
"link": "管理",
+2
View File
@@ -111,6 +111,8 @@
"nodes": "節點",
"settings": "面板設定",
"xray": "Xray 設定",
"routing": "路由",
"outbounds": "出站",
"apiDocs": "API 文件",
"logout": "退出登入",
"link": "管理",