feat(web): 优化聊天页面语音控制图标和空状态图片

- 将文本转语音的播放和停止图标替换为 Ant Design 图标
- 将空状态图片从 PNG 改为 SVG 格式,优化视觉效果
main
Tuzki 5 months ago
parent 3e6d4ee17b
commit 90d13e5605
  1. 8
      web/components/chat/chat-content/agent-messages.tsx
  2. 2
      web/components/common/MyEmpty.tsx
  3. 1
      web/public/empty.svg

@ -1,5 +1,9 @@
import useTextToSpeech from '@/hooks/useTextToSpeech';
import { Button } from 'antd';
import {
SoundOutlined,
MutedOutlined,
} from '@ant-design/icons';
import { useMemo } from 'react';
import ReferencesContent from './ReferencesContent';
import styles from './common.module.scss';
@ -81,11 +85,11 @@ function AgentMessages({ data }: Props) {
<div className={`space-x-2 ${item.receiver === '?' ? 'hidden' : ''}`}>
{!isSpeaking ? (
<Button size='small' onClick={handleSpeak}>
📢
<SoundOutlined />
</Button>
) : (
<Button size='small' danger onClick={() => stop(textId)}>
🛑
<MutedOutlined />
</Button>
)}
</div>

@ -14,7 +14,7 @@ function MyEmpty({ className, error, description, refresh }: Props) {
return (
<Empty
image='/empty.png'
image='/empty.svg'
imageStyle={{ width: 320, height: 196, margin: '0 auto', maxWidth: '100%', maxHeight: '100%' }}
className={classNames('flex items-center justify-center flex-col h-full w-full', className)}
description={

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 24 KiB

Loading…
Cancel
Save