From 08e5abe1651a6f39436ade520ffa7eef2287049e Mon Sep 17 00:00:00 2001 From: imbytecat Date: Mon, 2 Mar 2026 06:48:32 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E5=B0=86=20Unicode=20=E8=BD=AC?= =?UTF-8?q?=E4=B9=89=E5=BA=8F=E5=88=97=E6=9B=BF=E6=8D=A2=E4=B8=BA=E5=8F=AF?= =?UTF-8?q?=E8=AF=BB=E7=9A=84=E4=B8=AD=E6=96=87=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/HistoryList.tsx | 8 ++++---- web/src/components/MicButton.tsx | 6 +++--- web/src/components/PreviewBox.tsx | 2 +- web/src/components/StatusBadge.tsx | 6 +++--- web/src/hooks/useRecorder.ts | 2 +- web/src/hooks/useWebSocket.ts | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/web/src/components/HistoryList.tsx b/web/src/components/HistoryList.tsx index 26c1203..d5b6342 100644 --- a/web/src/components/HistoryList.tsx +++ b/web/src/components/HistoryList.tsx @@ -18,7 +18,7 @@ export function HistoryList({ sendJSON }: HistoryListProps) { const handleItemClick = useCallback( (text: string) => { sendJSON({ type: "paste", text }); - showToast("\u53d1\u9001\u7c98\u8d34\u2026"); + showToast("发送粘贴…"); }, [sendJSON, showToast], ); @@ -27,20 +27,20 @@ export function HistoryList({ sendJSON }: HistoryListProps) {

- {"\u5386\u53f2\u8bb0\u5f55"} + {"历史记录"}

{history.length === 0 ? (

- {"\u6682\u65e0\u8bb0\u5f55"} + {"暂无记录"}

) : (
diff --git a/web/src/components/MicButton.tsx b/web/src/components/MicButton.tsx index af8764e..a1dcaac 100644 --- a/web/src/components/MicButton.tsx +++ b/web/src/components/MicButton.tsx @@ -73,10 +73,10 @@ export function MicButton({ onStart, onStop }: MicButtonProps) { width={48} height={48} fill="currentColor" - aria-label="\u9ea6\u514b\u98ce" + aria-label="麦克风" role="img" > - {"\u9ea6\u514b\u98ce"} + {"麦克风"} @@ -99,7 +99,7 @@ export function MicButton({ onStart, onStop }: MicButtonProps) {

- {"\u6309\u4f4f\u8bf4\u8bdd"} + {"按住说话"}

); diff --git a/web/src/components/PreviewBox.tsx b/web/src/components/PreviewBox.tsx index 5d7fc93..9dfb7d0 100644 --- a/web/src/components/PreviewBox.tsx +++ b/web/src/components/PreviewBox.tsx @@ -17,7 +17,7 @@ export function PreviewBox() {

- {hasText ? text : "\u6309\u4f4f\u8bf4\u8bdd\u2026"} + {hasText ? text : "按住说话…"}

diff --git a/web/src/components/StatusBadge.tsx b/web/src/components/StatusBadge.tsx index dd48550..3260792 100644 --- a/web/src/components/StatusBadge.tsx +++ b/web/src/components/StatusBadge.tsx @@ -2,17 +2,17 @@ import { useAppStore } from "../stores/app-store"; const statusConfig = { connected: { - text: "\u5df2\u8fde\u63a5", + text: "已连接", dotClass: "bg-success shadow-[0_0_6px_rgba(52,211,153,0.5)]", borderClass: "border-success/15", }, disconnected: { - text: "\u5df2\u65ad\u5f00", + text: "已断开", dotClass: "bg-danger shadow-[0_0_6px_rgba(244,63,94,0.4)]", borderClass: "border-edge", }, connecting: { - text: "\u8fde\u63a5\u4e2d\u2026", + text: "连接中…", dotClass: "bg-accent animate-pulse-dot", borderClass: "border-edge", }, diff --git a/web/src/hooks/useRecorder.ts b/web/src/hooks/useRecorder.ts index ad48d9f..3c8c02c 100644 --- a/web/src/hooks/useRecorder.ts +++ b/web/src/hooks/useRecorder.ts @@ -91,7 +91,7 @@ export function useRecorder({ sendJSON, sendBinary }: UseRecorderOptions) { abortRef.current = null; useAppStore .getState() - .showToast(`\u9ea6\u514b\u98ce\u9519\u8bef: ${(err as Error).message}`); + .showToast(`麦克风错误: ${(err as Error).message}`); } }, [initAudio]); diff --git a/web/src/hooks/useWebSocket.ts b/web/src/hooks/useWebSocket.ts index 6133a34..617b8e7 100644 --- a/web/src/hooks/useWebSocket.ts +++ b/web/src/hooks/useWebSocket.ts @@ -58,10 +58,10 @@ export function useWebSocket() { if (msg.text) store.addHistory(msg.text); break; case "pasted": - store.showToast("\u2705 \u5df2\u7c98\u8d34"); + store.showToast("✅ 已粘贴"); break; case "error": - store.showToast(`\u274c ${msg.message || "\u9519\u8bef"}`); + store.showToast(`❌ ${msg.message || "错误"}`); break; } } catch {