File tree Expand file tree Collapse file tree 4 files changed +7
-1
lines changed
web/src/components/Markdown Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 134134 "k5be1a5b0" : " Delete role group" ,
135135 "k5bec387" : " Unable to get group information" ,
136136 "k5ce4e16d" : " Clear" ,
137+ "k5d1e4cd8" : " Custom styles are not supported" ,
137138 "k5d2a6631" : " Allow to manage channels" ,
138139 "k5f91e72c" : " Built Plugins" ,
139140 "k5fc9ccb6" : " Operation too frequently" ,
Original file line number Diff line number Diff line change 134134 "k5be1a5b0" : " 删除身份组" ,
135135 "k5bec387" : " 无法获取到群组信息" ,
136136 "k5ce4e16d" : " 清除" ,
137+ "k5d1e4cd8" : " 不支持自定义样式" ,
137138 "k5d2a6631" : " 允许管理频道" ,
138139 "k5f91e72c" : " 内置插件" ,
139140 "k5fc9ccb6" : " 操作过于频繁" ,
Original file line number Diff line number Diff line change 11.tailchat-markdown {
2+ min-height : 24px ;
3+
24 * {
35 user-select : text ;
46 }
Original file line number Diff line number Diff line change 11import { makeAbsoluteUrl } from '@/utils/url-helper' ;
22import React , { useCallback , useMemo } from 'react' ;
3- import { isValidStr , parseUrlStr } from 'tailchat-shared' ;
3+ import { isValidStr , parseUrlStr , useTranslation } from 'tailchat-shared' ;
44import { Loadable } from '../Loadable' ;
55import { Image } from 'tailchat-design' ;
66import remarkGfm from 'remark-gfm' ;
@@ -15,6 +15,7 @@ export const Markdown: React.FC<{
1515 raw : string ;
1616 baseUrl ?: string ;
1717} > = React . memo ( ( { raw, baseUrl } ) => {
18+ const { t } = useTranslation ( ) ;
1819 const transformUrl = useCallback (
1920 ( url : string ) => {
2021 url = parseUrlStr ( url ) ;
@@ -43,6 +44,7 @@ export const Markdown: React.FC<{
4344 preview = { true }
4445 />
4546 ) ,
47+ style : ( ) => < div > { t ( '不支持自定义样式' ) } </ div > ,
4648 } ) ,
4749 [ ]
4850 ) ;
You can’t perform that action at this time.
0 commit comments