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:
@@ -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 时(设备未识别完毕)不应该停在 initializing;ConnectScreen 会拦截
|
||||
// 没有 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
|
||||
|
||||
Reference in New Issue
Block a user