's'
This commit is contained in:
@@ -81,7 +81,6 @@ type HubDashboard = {
|
||||
admin_password?: string;
|
||||
note_zh?: string;
|
||||
};
|
||||
neko_firefox_enabled?: boolean;
|
||||
};
|
||||
services?: Array<{
|
||||
service_id: string;
|
||||
@@ -93,7 +92,10 @@ type HubDashboard = {
|
||||
detail?: string;
|
||||
url?: string;
|
||||
}>;
|
||||
android?: { adb_available: boolean; devices: Array<{ serial: string; model?: string; state: string }> };
|
||||
android?: {
|
||||
adb_available: boolean;
|
||||
devices: Array<{ serial: string; model?: string; state: string; transport?: string }>;
|
||||
};
|
||||
live?: {
|
||||
backend_mode?: string;
|
||||
processes?: Array<{
|
||||
@@ -131,11 +133,6 @@ type HubDashboard = {
|
||||
tcp?: { ok?: boolean; reachable?: boolean; latency_ms?: number; error?: string };
|
||||
http?: { ok?: boolean; http_code?: number; reachable?: boolean; latency_ms?: number; error?: string };
|
||||
};
|
||||
neko_firefox?: {
|
||||
port?: number;
|
||||
tcp?: { ok?: boolean; reachable?: boolean; latency_ms?: number; error?: string };
|
||||
http?: { ok?: boolean; http_code?: number; reachable?: boolean; latency_ms?: number; error?: string };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -314,11 +311,6 @@ export default function LiveControlApp() {
|
||||
return o;
|
||||
}, [dash?.stack?.quick_links]);
|
||||
|
||||
const scrcpyUrl = useMemo(
|
||||
() => (ql.ws_scrcpy ? normalizeBrowserReachableHttpUrl(ql.ws_scrcpy) : ""),
|
||||
[ql.ws_scrcpy],
|
||||
);
|
||||
|
||||
const runService = async (service: string, action: "start" | "stop" | "restart") => {
|
||||
setBusy(`svc:${service}`);
|
||||
try {
|
||||
@@ -827,7 +819,7 @@ export default function LiveControlApp() {
|
||||
<h3 className="text-sm font-semibold text-white">Neko {t("登录", "sign-in")}</h3>
|
||||
<p className="mt-1 text-[11px] text-zinc-500">
|
||||
{dash.stack.neko_login.note_zh ||
|
||||
t("Chromium :9200 与 Firefox :9201(若启用)共用下列账号策略。", "Chromium :9200 and Firefox :9201 share the same policy.")}
|
||||
t("Neko Chromium :9200 使用下列账号策略。", "Neko Chromium :9200 uses the policy below.")}
|
||||
</p>
|
||||
<p className="mt-2 text-[11px] text-amber-200/85">
|
||||
{t(
|
||||
@@ -1050,38 +1042,6 @@ export default function LiveControlApp() {
|
||||
);
|
||||
})()
|
||||
) : null}
|
||||
{dash.probes.neko_firefox ? (
|
||||
(() => {
|
||||
const p = dash.probes?.neko_firefox;
|
||||
const tcpOk = p?.tcp?.reachable;
|
||||
const http = p?.http;
|
||||
return (
|
||||
<div className="rounded-2xl border border-white/[0.07] bg-zinc-950/40 p-4 backdrop-blur-sm">
|
||||
<p className="text-xs font-semibold text-white">Neko Firefox</p>
|
||||
<p className="mt-1 text-[11px] text-zinc-500">
|
||||
{t(
|
||||
"第二桌面(ENABLE_NEKO_FF=1);口令与 Chromium 相同。",
|
||||
"Second desktop (ENABLE_NEKO_FF=1); same passwords as Chromium.",
|
||||
)}
|
||||
</p>
|
||||
<p className="mt-2 font-mono text-[11px] text-zinc-500">
|
||||
:{p?.port ?? "—"} · TCP {tcpOk ? "OK" : "—"} · HTTP {http?.http_code ?? "—"}
|
||||
</p>
|
||||
<p className="mt-1 text-[11px] text-zinc-500">
|
||||
{t("延迟", "RTT")}{" "}
|
||||
{http?.latency_ms != null
|
||||
? `${http.latency_ms} ms`
|
||||
: p?.tcp?.latency_ms != null
|
||||
? `${p.tcp.latency_ms} ms`
|
||||
: "—"}
|
||||
</p>
|
||||
{!http?.reachable && http?.error ? (
|
||||
<p className="mt-1 line-clamp-2 text-[10px] text-amber-200/80">{http.error}</p>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
})()
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
@@ -1132,14 +1092,6 @@ export default function LiveControlApp() {
|
||||
)}
|
||||
</p>
|
||||
) : null}
|
||||
{s.service_id === "neko_firefox" ? (
|
||||
<p className="mt-2 text-[11px] leading-snug text-fuchsia-200/80">
|
||||
{t(
|
||||
"第二套 Neko 桌面(Firefox);ENABLE_NEKO_FF=1。登录:昵称任意,密码 = NEKO_USER_PASS / NEKO_ADMIN_PASS(与 Chromium 相同,默认 12345678)。",
|
||||
"Second Neko desktop (Firefox). Login: any display name; password = NEKO_USER_PASS / NEKO_ADMIN_PASS (same as Chromium).",
|
||||
)}
|
||||
</p>
|
||||
) : null}
|
||||
<div className="mt-4 flex flex-wrap items-center gap-2">
|
||||
{s.url ? (
|
||||
<a
|
||||
@@ -1245,16 +1197,17 @@ export default function LiveControlApp() {
|
||||
t={t}
|
||||
notify={notify}
|
||||
fetchJson={fetchJson}
|
||||
apiBase={base}
|
||||
busy={busy}
|
||||
androidSerial={androidSerial}
|
||||
setAndroidSerial={setAndroidSerial}
|
||||
devices={dash?.android?.devices || []}
|
||||
adbAvailable={!!dash?.android?.adb_available}
|
||||
scrcpyUrl={scrcpyUrl}
|
||||
apkPath={apkPath}
|
||||
setApkPath={setApkPath}
|
||||
onAndroidAction={(action, payload) => androidAction(action, payload ?? {})}
|
||||
onCopy={copyText}
|
||||
onRefreshDevices={() => void refreshDashboard()}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user