fix(chat): hide voice message transcript
This commit is contained in:
@@ -81,7 +81,6 @@ export function MessageContent({
|
|||||||
{hasAudio && audioUrl ? (
|
{hasAudio && audioUrl ? (
|
||||||
<VoiceBubble
|
<VoiceBubble
|
||||||
audioUrl={audioUrl}
|
audioUrl={audioUrl}
|
||||||
content={content}
|
|
||||||
isFromAI={isFromAI}
|
isFromAI={isFromAI}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -96,14 +96,6 @@
|
|||||||
height: 26px;
|
height: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
|
||||||
margin: 0;
|
|
||||||
font-size: var(--font-size-md, 14px);
|
|
||||||
line-height: 1.45;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
word-break: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--color-error, #ff4d4f);
|
color: var(--color-error, #ff4d4f);
|
||||||
|
|||||||
@@ -7,13 +7,11 @@ import styles from "./voice-bubble.module.css";
|
|||||||
|
|
||||||
export interface VoiceBubbleProps {
|
export interface VoiceBubbleProps {
|
||||||
audioUrl: string;
|
audioUrl: string;
|
||||||
content?: string;
|
|
||||||
isFromAI: boolean;
|
isFromAI: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function VoiceBubble({
|
export function VoiceBubble({
|
||||||
audioUrl,
|
audioUrl,
|
||||||
content = "",
|
|
||||||
isFromAI,
|
isFromAI,
|
||||||
}: VoiceBubbleProps) {
|
}: VoiceBubbleProps) {
|
||||||
const audioRef = useRef<HTMLAudioElement>(null);
|
const audioRef = useRef<HTMLAudioElement>(null);
|
||||||
@@ -82,7 +80,6 @@ export function VoiceBubble({
|
|||||||
<span />
|
<span />
|
||||||
<span />
|
<span />
|
||||||
</div>
|
</div>
|
||||||
{content.length > 0 ? <p className={styles.text}>{content}</p> : null}
|
|
||||||
{hasError ? (
|
{hasError ? (
|
||||||
<p className={styles.error}>Voice message failed to load.</p>
|
<p className={styles.error}>Voice message failed to load.</p>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
Reference in New Issue
Block a user