From dd525adaeff737757d84f2ce886685d8c2c18cd9 Mon Sep 17 00:00:00 2001 From: xtcnet Date: Tue, 17 Mar 2026 21:44:02 +0700 Subject: [PATCH] feat(login): show xGat3 button only when accessed via IP address Hide the Open xGat3 button when the page is accessed via a domain name. Only show it when the hostname is a raw IP (e.g. 10.0.0.1 over WireGuard). Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/pages/Login/index.tsx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/Login/index.tsx b/frontend/src/pages/Login/index.tsx index 6de6b92..aa70aef 100644 --- a/frontend/src/pages/Login/index.tsx +++ b/frontend/src/pages/Login/index.tsx @@ -198,16 +198,18 @@ export default function Login() {
{getVersion()}
-
- - Open xGat3 - -
+ {/^\d+\.\d+\.\d+\.\d+$/.test(window.location.hostname) && ( +
+ + Open xGat3 + +
+ )} );