mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-19 20:16:49 +08:00
### 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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user