diff --git a/web/src/components/highlight-markdown/index.tsx b/web/src/components/highlight-markdown/index.tsx index 5940ed881..faad4bf0c 100644 --- a/web/src/components/highlight-markdown/index.tsx +++ b/web/src/components/highlight-markdown/index.tsx @@ -1,3 +1,4 @@ +import classNames from 'classnames'; import Markdown from 'react-markdown'; import SyntaxHighlighter from 'react-syntax-highlighter'; import rehypeRaw from 'rehype-raw'; @@ -7,14 +8,16 @@ import styles from './index.less'; const HightLightMarkdown = ({ children, + className, }: { children: string | null | undefined; + className?: string; }) => { return ( { {...props} src={`${api_host}/document/image/${id}`} alt="" - className={className} + className={classNames(styles.primitiveImg, className)} /> ); }; diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts index 31683f5df..d242a2519 100644 --- a/web/src/locales/en.ts +++ b/web/src/locales/en.ts @@ -431,6 +431,7 @@ The above is the content you need to summarize.`, tts: 'Text to speech', ttsTip: 'To play the voice using voice conversion, please select TTS (speech conversion model) in the settings first.', + relatedQuestion: 'Related question', }, setting: { profile: 'Profile', diff --git a/web/src/locales/zh-traditional.ts b/web/src/locales/zh-traditional.ts index 6b7dabe9d..dd7b4d571 100644 --- a/web/src/locales/zh-traditional.ts +++ b/web/src/locales/zh-traditional.ts @@ -400,6 +400,7 @@ export default { read: '朗讀內容', tts: '文字轉語音', ttsTip: '是否用語音轉換播放語音,請先在設定裡面選擇TTS(語音轉換模型)。', + relatedQuestion: '相關問題', }, setting: { profile: '概述', @@ -832,7 +833,7 @@ export default { wenCai: '問財', queryType: '查詢類型', wenCaiDescription: - '該組件可用於獲取廣泛的金融領域的信息,包括但不限於股票、基金等...', + '該組件可用於獲取廣泛的金融領域的o息,包括但不限於股票、基金等...', wenCaiQueryTypeOptions: { stock: '股票', zhishu: '指數', diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.ts index a98bc440c..71c97c33c 100644 --- a/web/src/locales/zh.ts +++ b/web/src/locales/zh.ts @@ -417,6 +417,7 @@ export default { read: '朗读内容', tts: '文本转语音', ttsTip: '是否用语音转换播放语音,请先在设置里面选择TTS(语音转换模型)。', + relatedQuestion: '相关问题', }, setting: { profile: '概要', diff --git a/web/src/pages/search/index.less b/web/src/pages/search/index.less index 0c239ada1..1b0bd5134 100644 --- a/web/src/pages/search/index.less +++ b/web/src/pages/search/index.less @@ -168,3 +168,9 @@ background-position: 200% center; } } + +.popupMarkdown { + width: 60vw; + max-height: 40vh; + overflow: auto; +} diff --git a/web/src/pages/search/index.tsx b/web/src/pages/search/index.tsx index 94f4e8aa4..05e9a009a 100644 --- a/web/src/pages/search/index.tsx +++ b/web/src/pages/search/index.tsx @@ -19,6 +19,7 @@ import { List, Pagination, PaginationProps, + Popover, Skeleton, Space, Tag, @@ -150,9 +151,21 @@ const SearchPage = () => { - - {item.highlight} - + + + {item.content_with_weight} + + + } + > +
+ + {item.highlight} + +
+
@@ -160,7 +173,7 @@ const SearchPage = () => { /> )} {relatedQuestions?.length > 0 && ( - + {relatedQuestions?.map((x, idx) => (