Feat: Modify the text of the embedded website button #3909 (#4057)

### What problem does this PR solve?

Feat: Modify the text of the embedded website button #3909

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-12-17 14:46:54 +08:00
committed by GitHub
parent 96667696d2
commit 0fcb564261
7 changed files with 29 additions and 8 deletions

View File

@ -5,6 +5,8 @@ import { useTranslate } from '@/hooks/common-hooks';
import { IModalProps } from '@/interfaces/common';
import { Card, Modal, Tabs, TabsProps, Typography } from 'antd';
import { useIsDarkTheme } from '@/components/theme-provider';
import { cn } from '@/lib/utils';
import styles from './index.less';
const { Paragraph, Link } = Typography;
@ -23,6 +25,7 @@ const EmbedModal = ({
isAgent: boolean;
}) => {
const { t } = useTranslate('chat');
const isDarkTheme = useIsDarkTheme();
const text = `
~~~ html
@ -67,7 +70,7 @@ const EmbedModal = ({
return (
<Modal
title={t('embedModalTitle')}
title={t('embedIntoSite', { keyPrefix: 'common' })}
open={visible}
style={{ top: 300 }}
width={'50vw'}
@ -79,7 +82,12 @@ const EmbedModal = ({
{t(isAgent ? 'flow' : 'chat', { keyPrefix: 'header' })}
<span className="ml-1 inline-block">ID</span>
</div>
<Paragraph copyable={{ text: token }} className={styles.id}>
<Paragraph
copyable={{ text: token }}
className={cn(styles.id, {
[styles.darkId]: isDarkTheme,
})}
>
{token}
</Paragraph>
<Link