From b69cc7a18ecf998532561ff775399922ce5ad156 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Fri, 8 May 2026 14:30:48 +0200 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20Phase=206-v=20=E2=80=94=20xra?= =?UTF-8?q?y=20Balancers=20tab=20+=20DNS=20placeholder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brings Balancers to full parity with the legacy panel and adds a DNS tab placeholder that exposes the full dns/fakedns trees as JSON so users can edit them without falling through to Advanced. - BalancerFormModal.vue: tag (with duplicate-tag warning across other balancers), strategy (random/roundRobin/leastLoad/leastPing), selector tag-mode multi-select sourced from existing outbound tags + free-form additions, fallback. Disable-on-invalid is driven by the duplicateTag + emptySelector computed flags. - BalancersTab.vue: empty state with a single "Add balancer" CTA; populated state shows the legacy 4-column table (action / tag / strategy / selector / fallback) with per-row edit + delete in a dropdown. On submit the wire shape preserves the `strategy: { type }` nesting only when the strategy is non-default, matching the legacy emit. Tag renames also chase across routing.rules.balancerTag references so existing rules don't dangle. - DnsTab.vue: master enable switch + raw JSON for `dns` and `fakedns`. Legacy had a dedicated server-by-server editor + a fakedns row editor; both are big enough to deserve their own commits, and the JSON path supports every field today. WARP / NordVPN provisioning modals still toast as "coming soon" — those are third-party API integrations worth their own commits. The xray page now has structured editors for Basics / Routing / Outbounds / Balancers and JSON editors for DNS / Advanced — every xray tab the legacy panel offered is functional. Co-Authored-By: Claude Opus 4.7 --- frontend/src/pages/xray/BalancerFormModal.vue | 111 ++++++++++ frontend/src/pages/xray/BalancersTab.vue | 205 ++++++++++++++++++ frontend/src/pages/xray/DnsTab.vue | 111 ++++++++++ frontend/src/pages/xray/XrayPage.vue | 6 +- 4 files changed, 431 insertions(+), 2 deletions(-) create mode 100644 frontend/src/pages/xray/BalancerFormModal.vue create mode 100644 frontend/src/pages/xray/BalancersTab.vue create mode 100644 frontend/src/pages/xray/DnsTab.vue diff --git a/frontend/src/pages/xray/BalancerFormModal.vue b/frontend/src/pages/xray/BalancerFormModal.vue new file mode 100644 index 00000000..c77411f7 --- /dev/null +++ b/frontend/src/pages/xray/BalancerFormModal.vue @@ -0,0 +1,111 @@ + + + diff --git a/frontend/src/pages/xray/BalancersTab.vue b/frontend/src/pages/xray/BalancersTab.vue new file mode 100644 index 00000000..2c4023a8 --- /dev/null +++ b/frontend/src/pages/xray/BalancersTab.vue @@ -0,0 +1,205 @@ + + + + + diff --git a/frontend/src/pages/xray/DnsTab.vue b/frontend/src/pages/xray/DnsTab.vue new file mode 100644 index 00000000..e20c9a90 --- /dev/null +++ b/frontend/src/pages/xray/DnsTab.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/frontend/src/pages/xray/XrayPage.vue b/frontend/src/pages/xray/XrayPage.vue index 605b18da..b7cf1f58 100644 --- a/frontend/src/pages/xray/XrayPage.vue +++ b/frontend/src/pages/xray/XrayPage.vue @@ -18,6 +18,8 @@ import AppSidebar from '@/components/AppSidebar.vue'; import BasicsTab from './BasicsTab.vue'; import RoutingTab from './RoutingTab.vue'; import OutboundsTab from './OutboundsTab.vue'; +import BalancersTab from './BalancersTab.vue'; +import DnsTab from './DnsTab.vue'; import { useXraySetting } from './useXraySetting.js'; // Phase 6-i: scaffold + advanced JSON tab. Other tabs (Basics, Routing, @@ -183,14 +185,14 @@ function confirmRestart() { - + - +