diff --git a/web/src/components/highlight-markdown/index.tsx b/web/src/components/highlight-markdown/index.tsx index faad4bf0c..57eda455e 100644 --- a/web/src/components/highlight-markdown/index.tsx +++ b/web/src/components/highlight-markdown/index.tsx @@ -8,16 +8,14 @@ import styles from './index.less'; const HightLightMarkdown = ({ children, - className, }: { children: string | null | undefined; - className?: string; }) => { return ( p { + background: rgb(232 242 251 / 70%); + box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08); + :global(.ant-card-head) { + background-color: #e6f4ff; + } + & p { margin: 0; } } diff --git a/web/src/pages/search/index.tsx b/web/src/pages/search/index.tsx index f236c8c70..3cba299ab 100644 --- a/web/src/pages/search/index.tsx +++ b/web/src/pages/search/index.tsx @@ -25,13 +25,14 @@ import { Spin, Tag, } from 'antd'; +import DOMPurify from 'dompurify'; +import { isEmpty } from 'lodash'; import { useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import MarkdownContent from '../chat/markdown-content'; import { useFetchBackgroundImage, useSendQuestion } from './hooks'; -import SearchSidebar from './sidebar'; - import styles from './index.less'; +import SearchSidebar from './sidebar'; const { Content } = Layout; const { Search } = Input; @@ -123,16 +124,28 @@ const SearchPage = () => { className={isMindMapEmpty ? styles.largeMain : styles.main} > {InputSearch} - {answer.answer && ( -
- -
- )} + + + {t('chat.answerTitle')} + + } + className={styles.answerWrapper} + > + {isEmpty(answer) && sendingLoading ? ( + + ) : ( + answer.answer && ( + + ) + )} + { } > -
- - {item.highlight} - -
+