diff --git a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout-main.tsx b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout-main.tsx index ef19b6d92e..078c7ebd8c 100644 --- a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout-main.tsx +++ b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout-main.tsx @@ -1,22 +1,22 @@ 'use client' -import type { FC, SVGProps } from 'react' +import type { FC } from 'react' import React, { useEffect, useMemo } from 'react' import { usePathname } from 'next/navigation' import useSWR from 'swr' import { useTranslation } from 'react-i18next' import { useBoolean } from 'ahooks' import { - Cog8ToothIcon, - DocumentTextIcon, + RiEqualizer2Fill, + RiEqualizer2Line, + RiFileTextFill, + RiFileTextLine, + RiFocus2Fill, + RiFocus2Line, +} from '@remixicon/react' +import { PaperClipIcon, } from '@heroicons/react/24/outline' -import { - Cog8ToothIcon as Cog8ToothSolidIcon, - // CommandLineIcon as CommandLineSolidIcon, - DocumentTextIcon as DocumentTextSolidIcon, -} from '@heroicons/react/24/solid' import { RiApps2AddLine, RiBookOpenLine, RiInformation2Line } from '@remixicon/react' -import s from './style.module.css' import classNames from '@/utils/classnames' import { fetchDatasetDetail, fetchDatasetRelatedApps } from '@/service/datasets' import type { RelatedAppResponse } from '@/models/datasets' @@ -37,27 +37,6 @@ export type IAppDetailLayoutProps = { params: { datasetId: string } } -const TargetIcon = ({ className }: SVGProps) => { - return - - - - - - - - - -} - -const TargetSolidIcon = ({ className }: SVGProps) => { - return - - - - -} - type IExtraInfoProps = { isMobile: boolean relatedApps?: RelatedAppResponse @@ -98,9 +77,9 @@ const ExtraInfo = ({ isMobile, relatedApps, expand }: IExtraInfoProps) => { )} - {isMobile &&
+ {isMobile &&
{relatedAppsTotal || '--'} - +
} )} @@ -164,17 +143,16 @@ const DatasetDetailLayout: FC = (props) => { const navigation = useMemo(() => { const baseNavigation = [ - { name: t('common.datasetMenus.hitTesting'), href: `/datasets/${datasetId}/hitTesting`, icon: TargetIcon, selectedIcon: TargetSolidIcon }, - // { name: 'api & webhook', href: `/datasets/${datasetId}/api`, icon: CommandLineIcon, selectedIcon: CommandLineSolidIcon }, - { name: t('common.datasetMenus.settings'), href: `/datasets/${datasetId}/settings`, icon: Cog8ToothIcon, selectedIcon: Cog8ToothSolidIcon }, + { name: t('common.datasetMenus.hitTesting'), href: `/datasets/${datasetId}/hitTesting`, icon: RiFocus2Line, selectedIcon: RiFocus2Fill }, + { name: t('common.datasetMenus.settings'), href: `/datasets/${datasetId}/settings`, icon: RiEqualizer2Line, selectedIcon: RiEqualizer2Fill }, ] if (datasetRes?.provider !== 'external') { baseNavigation.unshift({ name: t('common.datasetMenus.documents'), href: `/datasets/${datasetId}/documents`, - icon: DocumentTextIcon, - selectedIcon: DocumentTextSolidIcon, + icon: RiFileTextLine, + selectedIcon: RiFileTextFill, }) } return baseNavigation diff --git a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/style.module.css b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/style.module.css deleted file mode 100644 index 516b124809..0000000000 --- a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/style.module.css +++ /dev/null @@ -1,9 +0,0 @@ -.statusPoint { - @apply flex justify-center items-center absolute -right-0.5 -bottom-0.5 w-2.5 h-2.5 bg-white rounded; -} -.subTitle { - @apply uppercase text-xs text-gray-500 font-medium px-3 pb-2 pt-4; -} -.emptyIconDiv { - @apply h-7 w-7 bg-gray-50 border border-[#EAECF5] inline-flex justify-center items-center rounded-lg; -} diff --git a/web/app/components/app-sidebar/index.tsx b/web/app/components/app-sidebar/index.tsx index 67ede51101..3276a1c0a7 100644 --- a/web/app/components/app-sidebar/index.tsx +++ b/web/app/components/app-sidebar/index.tsx @@ -1,7 +1,6 @@ import React, { useEffect } from 'react' import { useShallow } from 'zustand/react/shallow' -import { RiLayoutRight2Line } from '@remixicon/react' -import { LayoutRight2LineMod } from '../base/icons/src/public/knowledge' +import { RiLayoutLeft2Line, RiLayoutRight2Line } from '@remixicon/react' import NavLink from './navLink' import type { NavIcon } from './navLink' import AppBasic from './basic' @@ -108,13 +107,13 @@ const AppDetailNav = ({ title, desc, isExternal, icon, icon_background, navigati `} >
handleToggle(appSidebarExpand)} > { expand ? - : + : }
diff --git a/web/app/components/base/notion-icon/index.module.css b/web/app/components/base/notion-icon/index.module.css deleted file mode 100644 index 2947260fd4..0000000000 --- a/web/app/components/base/notion-icon/index.module.css +++ /dev/null @@ -1,6 +0,0 @@ -.default-page-icon { - width: 20px; - height: 20px; - background: url(../notion-page-selector/assets/notion-page.svg) center center no-repeat; - background-size: cover; -} \ No newline at end of file diff --git a/web/app/components/base/notion-icon/index.tsx b/web/app/components/base/notion-icon/index.tsx index 8ad7f3bfc3..75fea8c378 100644 --- a/web/app/components/base/notion-icon/index.tsx +++ b/web/app/components/base/notion-icon/index.tsx @@ -1,4 +1,4 @@ -import s from './index.module.css' +import { RiFileTextLine } from '@remixicon/react' import cn from '@/utils/classnames' import type { DataSourceNotionPage } from '@/models/common' @@ -51,7 +51,7 @@ const NotionIcon = ({ } return ( -
+ ) } diff --git a/web/app/components/datasets/create/file-preview/index.module.css b/web/app/components/datasets/create/file-preview/index.module.css index ee6ba96240..d4109e41fc 100644 --- a/web/app/components/datasets/create/file-preview/index.module.css +++ b/web/app/components/datasets/create/file-preview/index.module.css @@ -29,7 +29,7 @@ .previewContent .loading { width: 100%; height: 180px; - background: #f9fafb center no-repeat url(../assets/Loading.svg); + background: transparent center no-repeat url(../assets/Loading.svg); background-size: contain; } diff --git a/web/app/components/datasets/create/file-preview/index.tsx b/web/app/components/datasets/create/file-preview/index.tsx index 25ef845b6d..8a88834ebe 100644 --- a/web/app/components/datasets/create/file-preview/index.tsx +++ b/web/app/components/datasets/create/file-preview/index.tsx @@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { XMarkIcon } from '@heroicons/react/20/solid' +import Loading from '@/app/components/base/loading' import s from './index.module.css' import cn from '@/utils/classnames' import type { CustomFile as File } from '@/models/datasets' @@ -57,7 +58,7 @@ const FilePreview = ({
- {loading &&
} + {loading && } {!loading && (
{previewContent}
)} diff --git a/web/app/components/datasets/create/notion-page-preview/index.tsx b/web/app/components/datasets/create/notion-page-preview/index.tsx index d868f6007d..5b56036327 100644 --- a/web/app/components/datasets/create/notion-page-preview/index.tsx +++ b/web/app/components/datasets/create/notion-page-preview/index.tsx @@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { XMarkIcon } from '@heroicons/react/20/solid' +import Loading from '@/app/components/base/loading' import s from './index.module.css' import cn from '@/utils/classnames' import type { NotionPage } from '@/models/common' @@ -62,7 +63,7 @@ const NotionPagePreview = ({
- {loading &&
} + {loading && } {!loading && (
{previewContent}
)} diff --git a/web/app/components/datasets/create/step-one/index.module.css b/web/app/components/datasets/create/step-one/index.module.css index 4b5dfaa331..bbc5f5a634 100644 --- a/web/app/components/datasets/create/step-one/index.module.css +++ b/web/app/components/datasets/create/step-one/index.module.css @@ -60,13 +60,6 @@ width: 120px; } -.dividerLine { - margin: 32px 0; - max-width: 640px; - height: 1px; - background-color: #eaecf0; -} - .notionIcon { background: var(--color-components-card-bg) center no-repeat url(../assets/notion.svg); background-size: 24px; diff --git a/web/app/components/datasets/create/step-one/index.tsx b/web/app/components/datasets/create/step-one/index.tsx index 08345385d9..6f4231bb1f 100644 --- a/web/app/components/datasets/create/step-one/index.tsx +++ b/web/app/components/datasets/create/step-one/index.tsx @@ -301,7 +301,7 @@ const StepOne = ({ )} {!datasetId && ( <> -
+
{t('datasetCreation.stepOne.emptyDatasetCreation')} diff --git a/web/app/components/datasets/documents/detail/index.tsx b/web/app/components/datasets/documents/detail/index.tsx index cba1590fa9..2ee37bfe6a 100644 --- a/web/app/components/datasets/documents/detail/index.tsx +++ b/web/app/components/datasets/documents/detail/index.tsx @@ -4,7 +4,7 @@ import React, { useMemo, useState } from 'react' import { createContext, useContext, useContextSelector } from 'use-context-selector' import { useTranslation } from 'react-i18next' import { useRouter } from 'next/navigation' -import { RiArrowLeftLine, RiLayoutRight2Line } from '@remixicon/react' +import { RiArrowLeftLine, RiLayoutLeft2Line, RiLayoutRight2Line } from '@remixicon/react' import { OperationAction, StatusItem } from '../list' import DocumentPicker from '../../common/document-picker' import Completed from './completed' @@ -21,7 +21,6 @@ import type { ChunkingMode, ParentMode, ProcessMode } from '@/models/datasets' import { useDatasetDetailContext } from '@/context/dataset-detail' import FloatRightContainer from '@/app/components/base/float-right-container' import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' -import { LayoutRight2LineMod } from '@/app/components/base/icons/src/public/knowledge' import { useCheckSegmentBatchImportProgress, useChildSegmentListKey, useSegmentBatchImport, useSegmentListKey } from '@/service/knowledge/use-segment' import { useDocumentDetail, useDocumentMetadata, useInvalidDocumentList } from '@/service/knowledge/use-document' import { useInvalid } from '@/service/use-base' @@ -250,7 +249,7 @@ const DocumentDetail: FC = ({ datasetId, documentId }) => { > { showMetadata - ? + ? : } diff --git a/web/app/components/datasets/hit-testing/textarea.tsx b/web/app/components/datasets/hit-testing/textarea.tsx index 4321690e3c..d9f5bb18ee 100644 --- a/web/app/components/datasets/hit-testing/textarea.tsx +++ b/web/app/components/datasets/hit-testing/textarea.tsx @@ -13,7 +13,6 @@ import type { ExternalKnowledgeBaseHitTestingResponse, HitTestingResponse } from import { externalKnowledgeBaseHitTesting, hitTesting } from '@/service/datasets' import { asyncRunSafe } from '@/utils' import { RETRIEVE_METHOD, type RetrievalConfig } from '@/types/app' -import promptS from '@/app/components/app/configuration/config-prompt/style.module.css' type TextAreaWithButtonIProps = { datasetId: string @@ -107,7 +106,7 @@ const TextAreaWithButton = ({ const icon = return ( <> -
+
diff --git a/web/app/components/datasets/metadata/metadata-document/info-group.tsx b/web/app/components/datasets/metadata/metadata-document/info-group.tsx index 4d566872e0..9078c437e7 100644 --- a/web/app/components/datasets/metadata/metadata-document/info-group.tsx +++ b/web/app/components/datasets/metadata/metadata-document/info-group.tsx @@ -57,7 +57,7 @@ const InfoGroup: FC = ({ } return ( -
+
{!noHeader && (
diff --git a/web/app/components/datasets/settings/permission-selector/index.tsx b/web/app/components/datasets/settings/permission-selector/index.tsx index 522068285a..71a46087af 100644 --- a/web/app/components/datasets/settings/permission-selector/index.tsx +++ b/web/app/components/datasets/settings/permission-selector/index.tsx @@ -114,17 +114,17 @@ const PermissionSelector = ({ disabled, permission, value, memberList, onChange,
-
{ +
{ onChange(DatasetPermission.onlyMe) setOpen(false) }}>
-
{t('datasetSettings.form.permissionsOnlyMe')}
+
{t('datasetSettings.form.permissionsOnlyMe')}
{isOnlyMe && }
-
{ +
{ onChange(DatasetPermission.allTeamMembers) setOpen(false) }}> @@ -132,11 +132,11 @@ const PermissionSelector = ({ disabled, permission, value, memberList, onChange,
-
{t('datasetSettings.form.permissionsAllMember')}
+
{t('datasetSettings.form.permissionsAllMember')}
{isAllTeamMembers && }
-
{ +
{ onChange(DatasetPermission.partialMembers) onMemberSelect([userProfile.id]) }}> @@ -144,14 +144,14 @@ const PermissionSelector = ({ disabled, permission, value, memberList, onChange,
-
{t('datasetSettings.form.permissionsInvitedMembers')}
+
{t('datasetSettings.form.permissionsInvitedMembers')}
{isPartialMembers && }
{isPartialMembers && ( -
-
+
+