From bba93017881656f6d47a2809895ac6d246edb97f Mon Sep 17 00:00:00 2001 From: AkaraChen Date: Fri, 22 Nov 2024 14:09:41 +0800 Subject: [PATCH] fix: layout overflow --- web/app/components/datasets/create/index.tsx | 2 +- .../datasets/create/step-three/index.tsx | 2 +- .../datasets/create/top-bar/index.tsx | 18 ++++++++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/web/app/components/datasets/create/index.tsx b/web/app/components/datasets/create/index.tsx index c78fda6953..440e9c0ea2 100644 --- a/web/app/components/datasets/create/index.tsx +++ b/web/app/components/datasets/create/index.tsx @@ -121,7 +121,7 @@ const DatasetUpdateForm = ({ datasetId }: DatasetUpdateFormProps) => {
-
+
setShowAccountSettingModal({ payload: 'data-source' })} diff --git a/web/app/components/datasets/create/step-three/index.tsx b/web/app/components/datasets/create/step-three/index.tsx index 804a196ed5..85471f4513 100644 --- a/web/app/components/datasets/create/step-three/index.tsx +++ b/web/app/components/datasets/create/step-three/index.tsx @@ -22,7 +22,7 @@ const StepThree = ({ datasetId, datasetName, indexingType, creationCache }: Step const isMobile = media === MediaType.mobile return ( -
+
{!datasetId && ( diff --git a/web/app/components/datasets/create/top-bar/index.tsx b/web/app/components/datasets/create/top-bar/index.tsx index dc2604c45b..87ed8ed503 100644 --- a/web/app/components/datasets/create/top-bar/index.tsx +++ b/web/app/components/datasets/create/top-bar/index.tsx @@ -1,6 +1,7 @@ import type { FC } from 'react' import { RiArrowLeftLine } from '@remixicon/react' import Link from 'next/link' +import { useTranslation } from 'react-i18next' import { Stepper, type StepperProps } from '../stepper' import classNames from '@/utils/classnames' @@ -8,24 +9,29 @@ export type TopbarProps = Pick & { className?: string } +const STEP_T_MAP: Record = { + 1: 'datasetCreation.steps.one', + 2: 'datasetCreation.steps.two', + 3: 'datasetCreation.steps.three', +} + export const Topbar: FC = (props) => { const { className, ...rest } = props + const { t } = useTranslation() return

- Create Knowledge + {t('datasetCreation.steps.header.creation')}

({ + name: t(STEP_T_MAP[i + 1]), + }))} {...rest} />