Refactor build and start scripts in package.json; add plugin to exclude debug files from production build in vite.config.ts; remove ConnectScreen component and replace with ConnectionPlaceholder in multiple pages; update DeviceContext to auto-connect using device IP from URL; enhance locale files with new device IP labels.

This commit is contained in:
yangy
2026-05-22 15:54:11 +08:00
parent 747331c850
commit 32f15217ad
13 changed files with 199 additions and 173 deletions
+3 -3
View File
@@ -7,7 +7,7 @@
Backend: /sse/question (SSE), /sse/messages, /sse/chats, /sse/clear
============================================================ */
import BottomNav from "@/components/BottomNav";
import ConnectScreen from "@/components/ConnectScreen";
import ConnectionPlaceholder from "@/components/ConnectionPlaceholder";
import { useDevice } from "@/contexts/DeviceContext";
import {
AI_SPLIT_RESTORE_PATH_KEY,
@@ -337,7 +337,7 @@ export default function AIPage({ variant = "page", onClose }: AIPageProps = {})
})();
}, [mac, loadChat]);
// 没有 mac 时(设备未识别完毕)不应该停在 initializingConnectScreen 会拦截
// 没有 mac 时(设备未识别完毕)不应该停在 initializing未连接时 ConnectionPlaceholder 会拦截
useEffect(() => {
if (!mac && initializing) {
// 给 mac 一段缓冲期,否则即便最终没有 mac 也要释放欢迎页
@@ -692,7 +692,7 @@ export default function AIPage({ variant = "page", onClose }: AIPageProps = {})
const headerTitle = aiText.title;
if (!isConnected) return <ConnectScreen />;
if (!isConnected) return <ConnectionPlaceholder />;
return (
<div