feat: 增强弱网与断线场景下的移动端交互反馈
This commit is contained in:
@@ -3,7 +3,11 @@ import { useAppStore } from "../stores/app-store";
|
||||
export function PreviewBox() {
|
||||
const text = useAppStore((s) => s.previewText);
|
||||
const active = useAppStore((s) => s.previewActive);
|
||||
const weakNetwork = useAppStore((s) => s.weakNetwork);
|
||||
const recording = useAppStore((s) => s.recording);
|
||||
const hasText = text.length > 0;
|
||||
const placeholder =
|
||||
weakNetwork && recording ? "网络波动中,音频缓冲后发送…" : "按住说话…";
|
||||
|
||||
return (
|
||||
<section className="shrink-0 pb-3">
|
||||
@@ -17,7 +21,7 @@ export function PreviewBox() {
|
||||
<p
|
||||
className={`break-words text-base leading-relaxed ${hasText ? "" : "text-fg-dim"}`}
|
||||
>
|
||||
{hasText ? text : "按住说话…"}
|
||||
{hasText ? text : placeholder}
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user