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": "サードパーティの共有リンクやリモートのサブスクリプションURLを追加して、このクライアントのサブスクリプションに含めます。",
"addExternalLink": "外部リンクを追加",
"addExternalSubscription": "外部サブスクリプションを追加",
@@ -871,6 +873,9 @@
"bulkAdjustNothing": "適用する前に日数またはトラフィックを設定してください。",
"addDays": "日数を追加",
"addTrafficGB": "トラフィックを追加 (GB)",
"bulkFlow": "Flow を設定",
"bulkFlowNoChange": "変更なし",
"bulkFlowDisable": "無効化 (flow をクリア)",
"delDepleted": "使い切ったクライアントを削除",
"delDepletedConfirmTitle": "使い切ったクライアントを削除しますか?",
"delDepletedConfirmContent": "トラフィック上限に達したか有効期限が切れたクライアントをすべて削除します。元に戻せません。",