From 28cfd9facf3edd528a9d102a45ccc900604410f3 Mon Sep 17 00:00:00 2001 From: vianhanif Date: Sat, 5 Sep 2026 21:18:48 +0700 Subject: [PATCH] fix(dashboard): dynamic mode label for local/remote detection (#3801) --- src/app/(dashboard)/dashboard/profile/page.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/(dashboard)/dashboard/profile/page.js b/src/app/(dashboard)/dashboard/profile/page.js index 2a70e19c..685d053a 100644 --- a/src/app/(dashboard)/dashboard/profile/page.js +++ b/src/app/(dashboard)/dashboard/profile/page.js @@ -81,6 +81,12 @@ export default function ProfilePage() { const [proxyLoading, setProxyLoading] = useState(false); const [proxyTestLoading, setProxyTestLoading] = useState(false); + const [isRemoteHost, setIsRemoteHost] = useState(false); + useEffect(() => { + if (typeof window !== "undefined") + setIsRemoteHost(!["localhost", "127.0.0.1", "::1"].includes(window.location.hostname)); + }, []); + useEffect(() => { fetch("/api/settings") .then((res) => res.json()) @@ -1639,7 +1645,7 @@ export default function ProfilePage() { {/* App Info */}

{APP_CONFIG.name} v{APP_CONFIG.version}

-

Local Mode - All data stored on your machine

+

{isRemoteHost ? "Remote Mode" : "Local Mode - All data stored on your machine"}