fix(clients): hide WireGuard config after detaching the WG inbound

The client info and QR modals rendered a WireGuard config whenever the
client still carried leftover WG key material (privateKey / publicKey /
allowedIPs / preSharedKey / keepAlive), regardless of whether a WireGuard
inbound was actually attached. After detaching the WG inbound the config
kept showing, built with an empty endpoint port and public key.

Gate wgConfigText on an attached WireGuard inbound (wgInbound) being
present, not just isWireguardClient(client), in both ClientInfoModal and
ClientQrModal.

Also rename the i18n key pages.clients.conf -> config and add the missing
pages.clients keys (wireguardConfig, config, bulkFlow, bulkFlowNoChange,
bulkFlowDisable) to all 12 non-English locales so each one matches en-US.
This commit is contained in:
MHSanaei
2026-06-29 01:15:37 +02:00
parent a329882e0e
commit 6c71b725da
15 changed files with 64 additions and 4 deletions
+5
View File
@@ -718,6 +718,8 @@
"tabBasics": "基本",
"tabCredentials": "認證資訊",
"tabLinks": "連結",
"wireguardConfig": "WireGuard 設定",
"config": "設定",
"linksHint": "新增第三方分享連結和遠端訂閱網址,將其包含在此用戶端的訂閱中。",
"addExternalLink": "新增外部連結",
"addExternalSubscription": "新增外部訂閱",
@@ -871,6 +873,9 @@
"bulkAdjustNothing": "套用前請設定天數或流量。",
"addDays": "新增天數",
"addTrafficGB": "新增流量 (GB)",
"bulkFlow": "設定 flow",
"bulkFlowNoChange": "不變更",
"bulkFlowDisable": "停用(清除 flow",
"delDepleted": "刪除已耗盡",
"delDepletedConfirmTitle": "刪除已耗盡的客戶端?",
"delDepletedConfirmContent": "刪除所有流量配額已用盡或已過期的客戶端。此操作無法復原。",