fix: restore static workstation IP for local connection snippets and service urls
This commit is contained in:
+13
-13
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
<meta name="theme-color" content="#0d1117" />
|
<meta name="theme-color" content="#0d1117" />
|
||||||
<link rel="manifest" href="/manifest.webmanifest" />
|
<link rel="manifest" href="/manifest.webmanifest" />
|
||||||
<title>Mission Control 2.0</title>
|
<title>Mission Control 2.0</title>
|
||||||
<script type="module" crossorigin src="/assets/index-BtTFipce.js"></script>
|
<script type="module" crossorigin src="/assets/index-DphlB-Xi.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-CAfaSDN8.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-CAfaSDN8.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -7,9 +7,5 @@ export function cn(...inputs: ClassValue[]) {
|
|||||||
|
|
||||||
export function resolveExternalUrl(url?: string): string {
|
export function resolveExternalUrl(url?: string): string {
|
||||||
if (!url) return ""
|
if (!url) return ""
|
||||||
const currentHostname = window.location.hostname
|
return url.replace(/127\.0\.0\.1|localhost/g, "192.168.178.151")
|
||||||
if (currentHostname !== "127.0.0.1" && currentHostname !== "localhost" && currentHostname !== "") {
|
|
||||||
return url.replace(/127\.0\.0\.1|localhost/g, currentHostname)
|
|
||||||
}
|
|
||||||
return url
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,7 @@ import { api, type ConnectResp } from "@/lib/api"
|
|||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
export function ConnectView() {
|
export function ConnectView() {
|
||||||
const [host, setHost] = useState(() => {
|
const [host, setHost] = useState(localStorage.getItem("mc_host") || "192.168.178.151")
|
||||||
const saved = localStorage.getItem("mc_host")
|
|
||||||
if (saved) return saved
|
|
||||||
const hn = window.location.hostname
|
|
||||||
if (hn && hn !== "localhost" && hn !== "127.0.0.1") return hn
|
|
||||||
return "192.168.178.151"
|
|
||||||
})
|
|
||||||
const [mcpPath, setMcpPath] = useState(localStorage.getItem("mc_mcp_path") || "")
|
const [mcpPath, setMcpPath] = useState(localStorage.getItem("mc_mcp_path") || "")
|
||||||
const [data, setData] = useState<ConnectResp | null>(null)
|
const [data, setData] = useState<ConnectResp | null>(null)
|
||||||
const [active, setActive] = useState("cline")
|
const [active, setActive] = useState("cline")
|
||||||
|
|||||||
@@ -7,11 +7,7 @@ export function GuideView() {
|
|||||||
const [activeTab, setActiveTab] = useState<"roocode" | "cursor" | "opencode">("roocode")
|
const [activeTab, setActiveTab] = useState<"roocode" | "cursor" | "opencode">("roocode")
|
||||||
const [health, setHealth] = useState<Health | null>(null)
|
const [health, setHealth] = useState<Health | null>(null)
|
||||||
|
|
||||||
const currentHost = (() => {
|
const currentHost = "192.168.178.151"
|
||||||
const hn = window.location.hostname
|
|
||||||
if (hn && hn !== "localhost" && hn !== "127.0.0.1") return hn
|
|
||||||
return "192.168.178.151"
|
|
||||||
})()
|
|
||||||
|
|
||||||
const [testing, setTesting] = useState(false)
|
const [testing, setTesting] = useState(false)
|
||||||
const [testResult, setTestResult] = useState<string | null>(null)
|
const [testResult, setTestResult] = useState<string | null>(null)
|
||||||
|
|||||||
Reference in New Issue
Block a user