Feat: dataset dark mode (#17993)

This commit is contained in:
KVOJJJin
2025-04-14 15:45:23 +08:00
committed by GitHub
parent cd7fd100a7
commit ed63fbaf9a
14 changed files with 38 additions and 83 deletions

View File

@@ -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;
}

View File

@@ -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 = ({
</div>
</div>
<div className={cn(s.previewContent)}>
{loading && <div className={cn(s.loading)} />}
{loading && <Loading type='area' />}
{!loading && (
<div className={cn(s.fileContent, 'body-md-regular')}>{previewContent}</div>
)}

View File

@@ -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 = ({
</div>
</div>
<div className={cn(s.previewContent, 'body-md-regular')}>
{loading && <div className={cn(s.loading)} />}
{loading && <Loading type='area' />}
{!loading && (
<div className={cn(s.fileContent, 'body-md-regular')}>{previewContent}</div>
)}

View File

@@ -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;

View File

@@ -301,7 +301,7 @@ const StepOne = ({
)}
{!datasetId && (
<>
<div className={s.dividerLine} />
<div className='my-8 h-px max-w-[640px] bg-divider-regular' />
<span className="inline-flex cursor-pointer items-center text-[13px] leading-4 text-text-accent" onClick={modalShowHandle}>
<RiFolder6Line className="mr-1 size-4" />
{t('datasetCreation.stepOne.emptyDatasetCreation')}