(feature)(webapp) add show case and support multiple selection and deletion of filter conditions (#251)

This commit is contained in:
williamhliu
2023-10-18 09:56:35 +08:00
committed by GitHub
parent 8d81f63e08
commit 36052cb4f2
36 changed files with 492 additions and 134 deletions

View File

@@ -5,14 +5,16 @@ import LeftAvatar from './CopilotAvatar';
import Message from './Message';
import styles from './style.module.less';
import { userAvatarUrl } from '../../common/env';
import IconFont from '../../components/IconFont';
type Props = {
position: 'left' | 'right';
data: any;
quote?: string;
anonymousUser?: boolean;
};
const Text: React.FC<Props> = ({ position, data, quote }) => {
const Text: React.FC<Props> = ({ position, data, quote, anonymousUser }) => {
const textWrapperClass = classNames(styles.textWrapper, {
[styles.rightTextWrapper]: position === 'right',
});
@@ -25,7 +27,13 @@ const Text: React.FC<Props> = ({ position, data, quote }) => {
<div className={styles.text}>{data}</div>
</Message>
{!isMobile && position === 'right' && rightAvatarUrl && (
<Avatar shape="circle" size={40} src={rightAvatarUrl} className={styles.rightAvatar} />
<Avatar
shape="circle"
size={40}
src={anonymousUser ? undefined : rightAvatarUrl}
icon={<IconFont type="icon-geren" />}
className={styles.rightAvatar}
/>
)}
</div>
);