Browse Source

Bugfix/style and i18n fixes (#12350)

Wood 3 months ago
parent
commit
b8ba39dfae

+ 2 - 2
web/app/components/app/configuration/dataset-config/params-config/weighted-score.tsx

@@ -29,7 +29,7 @@ const WeightedScore = ({
 
   return (
     <div>
-      <div className='px-3 pt-5 h-[52px] space-x-3 rounded-lg border border-components-panel-border'>
+      <div className='px-3 pt-5 pb-2 space-x-3 rounded-lg border border-components-panel-border'>
         <Slider
           className={cn('grow h-0.5 !bg-util-colors-teal-teal-500 rounded-full')}
           max={1.0}
@@ -39,7 +39,7 @@ const WeightedScore = ({
           onChange={v => onChange({ value: [v, (10 - v * 10) / 10] })}
           trackClassName='weightedScoreSliderTrack'
         />
-        <div className='flex justify-between mt-1'>
+        <div className='flex justify-between mt-3'>
           <div className='shrink-0 flex items-center w-[90px] system-xs-semibold-uppercase text-util-colors-blue-light-blue-light-500'>
             <div className='mr-1 truncate uppercase' title={t('dataset.weightedScore.semantic') || ''}>
               {t('dataset.weightedScore.semantic')}

+ 2 - 2
web/app/components/base/chat/chat/question.tsx

@@ -28,8 +28,8 @@ const Question: FC<QuestionProps> = ({
   } = item
 
   return (
-    <div className='flex justify-end mb-2 last:mb-0 pl-10'>
-      <div className='group relative mr-4'>
+    <div className='flex justify-end mb-2 last:mb-0 pl-14'>
+      <div className='group relative mr-4 max-w-full'>
         <div
           className='px-4 py-3 bg-[#D1E9FF]/50 rounded-2xl text-sm text-gray-900'
           style={theme?.chatBubbleColorStyle ? CssTransform(theme.chatBubbleColorStyle) : {}}

+ 2 - 2
web/app/components/base/markdown.tsx

@@ -111,9 +111,9 @@ const CodeBlock: CodeComponent = memo(({ inline, className, children, ...props }
     }
     else if (language === 'echarts') {
       return (
-        <div style={{ minHeight: '350px', minWidth: '700px' }}>
+        <div style={{ minHeight: '350px', minWidth: '100%', overflowX: 'scroll' }}>
           <ErrorBoundary>
-            <ReactEcharts option={chartData} />
+            <ReactEcharts option={chartData} style={{ minWidth: '700px' }} />
           </ErrorBoundary>
         </div>
       )

+ 1 - 0
web/i18n/en-US/common.ts

@@ -39,6 +39,7 @@ const translation = {
     rename: 'Rename',
     audioSourceUnavailable: 'AudioSource is unavailable',
     copyImage: 'Copy Image',
+    imageCopied: 'Image copied',
     zoomOut: 'Zoom Out',
     zoomIn: 'Zoom In',
     openInNewTab: 'Open in new tab',

+ 1 - 0
web/i18n/zh-Hans/common.ts

@@ -39,6 +39,7 @@ const translation = {
     rename: '重命名',
     audioSourceUnavailable: '音源不可用',
     copyImage: '复制图片',
+    imageCopied: '图片已复制',
     zoomOut: '缩小',
     zoomIn: '放大',
     openInNewTab: '在新标签页打开',