4.8.10 test (#2470)

* i18n

* perf: invoice type

* fix: helper line change error

* perf: base64 image

* perf: app list ui

* perf: upload max size check

* perf: init system plugin

* perf: dataset list ui

* perf: http node ui

* perf: ui

* perf: invoice tip

* fix: ts

* perf: invoice table

* perf: null check
This commit is contained in:
Archer
2024-08-22 13:43:19 +08:00
committed by GitHub
parent 19904e648b
commit b3acd570f7
33 changed files with 576 additions and 552 deletions

View File

@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { ImageProps, Skeleton } from '@chakra-ui/react';
import { Box, ImageProps, Skeleton } from '@chakra-ui/react';
import MyPhotoView from '@fastgpt/web/components/common/Image/PhotoView';
import { useBoolean } from 'ahooks';
@@ -8,6 +8,10 @@ const MdImage = ({ src, ...props }: { src?: string } & ImageProps) => {
const [renderSrc, setRenderSrc] = useState(src);
if (src?.includes('base64') && !src.startsWith('data:image')) {
return <Box>Invalid base64 image</Box>;
}
return (
<Skeleton isLoaded={isLoaded}>
<MyPhotoView

View File

@@ -1,4 +1,4 @@
import React, { useMemo } from 'react';
import React, { useCallback, useMemo } from 'react';
import ReactMarkdown from 'react-markdown';
import 'katex/dist/katex.min.css';
import RemarkMath from 'remark-math'; // Math syntax
@@ -52,6 +52,10 @@ const Markdown = ({
return formatSource;
}, [source]);
const urlTransform = useCallback((val: string) => {
return val;
}, []);
return (
<ReactMarkdown
className={`markdown ${styles.markdown}
@@ -60,6 +64,7 @@ const Markdown = ({
remarkPlugins={[RemarkMath, [RemarkGfm, { singleTilde: false }], RemarkBreaks]}
rehypePlugins={[RehypeKatex, [RehypeExternalLinks, { target: '_blank' }]]}
components={components}
urlTransform={urlTransform}
>
{formatSource}
</ReactMarkdown>

View File

@@ -9,6 +9,7 @@ const NextHead = ({ title, icon, desc }: { title?: string; icon?: string; desc?:
name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no, viewport-fit=cover"
/>
<meta httpEquiv="Content-Security-Policy" content="img-src * data:;" />
{desc && <meta name="description" content={desc} />}
{icon && <link rel="icon" href={icon} />}
</Head>