feat: dark mode for knowledge (#15236)

This commit is contained in:
Wu Tianwei
2025-03-19 11:19:57 +08:00
committed by GitHub
parent 97eadb867c
commit 411e332f1b
72 changed files with 473 additions and 761 deletions

View File

@@ -165,7 +165,7 @@ const ChildSegmentList: FC<IChildSegmentCardProps> = ({
onDelete={() => onDelete?.(childChunk.segment_id, childChunk.id)}
labelClassName={focused ? 'bg-state-accent-solid text-text-primary-on-surface' : ''}
labelInnerClassName={'text-[10px] font-semibold align-bottom leading-6'}
contentClassName={classNames('!leading-6', focused ? 'bg-state-accent-hover-alt text-text-primary' : '')}
contentClassName={classNames('!leading-6', focused ? 'bg-state-accent-hover-alt text-text-primary' : 'text-text-secondary')}
showDivider={false}
onClick={(e) => {
e.stopPropagation()

View File

@@ -17,7 +17,7 @@ const Textarea: FC<IContentProps> = React.memo(({
return (
<textarea
className={classNames(
'disabled:bg-transparent inset-0 outline-none border-none appearance-none resize-none w-full overflow-y-auto',
'bg-transparent inset-0 outline-none border-none appearance-none resize-none w-full overflow-y-auto',
className,
)}
placeholder={placeholder}
@@ -83,7 +83,7 @@ const AutoResizeTextArea: FC<IAutoResizeTextAreaProps> = React.memo(({
<textarea
ref={textareaRef}
className={classNames(
'disabled:bg-transparent inset-0 outline-none border-none appearance-none resize-none w-full',
'bg-transparent inset-0 outline-none border-none appearance-none resize-none w-full',
className,
)}
style={{

View File

@@ -103,15 +103,13 @@ const SegmentAdd: FC<ISegmentAddProps> = ({
manualClose
trigger='click'
htmlContent={
<div className='w-full p-1'>
<button
type='button'
className='w-full py-1.5 px-2 flex items-center hover:bg-state-base-hover rounded-lg text-text-secondary system-md-regular'
onClick={showBatchModal}
>
{t('datasetDocuments.list.action.batchAdd')}
</button>
</div>
<button
type='button'
className='w-full py-1.5 px-2 flex items-center rounded-lg text-text-secondary system-md-regular'
onClick={showBatchModal}
>
{t('datasetDocuments.list.action.batchAdd')}
</button>
}
btnElement={
<div className='flex justify-center items-center' >

View File

@@ -57,7 +57,7 @@ const DocumentSettings = ({ datasetId, documentId }: DocumentSettingsProps) => {
return (
<div className='flex' style={{ height: 'calc(100vh - 56px)' }}>
<div className="grow bg-white">
<div className="grow">
{!documentDetail && <Loading type='app' />}
{dataset && documentDetail && (
<StepTwo