From 25711ffae209c9c33a718e4ac3c149cf7c40e60f Mon Sep 17 00:00:00 2001 From: twwu Date: Fri, 7 Feb 2025 16:49:10 +0800 Subject: [PATCH] feat: enhance UI components with improved styling and icon updates --- web/app/components/base/search-input/index.tsx | 16 ++++++---------- .../detail/completed/child-segment-list.tsx | 2 +- .../detail/completed/common/chunk-content.tsx | 4 ++-- .../documents/detail/segment-add/index.tsx | 16 +++++++--------- .../datasets/documents/detail/settings/index.tsx | 2 +- .../datasets/documents/rename-modal.tsx | 2 +- 6 files changed, 18 insertions(+), 24 deletions(-) diff --git a/web/app/components/base/search-input/index.tsx b/web/app/components/base/search-input/index.tsx index 556a7bdf49..bd8d4de32a 100644 --- a/web/app/components/base/search-input/index.tsx +++ b/web/app/components/base/search-input/index.tsx @@ -1,9 +1,8 @@ import type { FC } from 'react' import { useRef, useState } from 'react' import { useTranslation } from 'react-i18next' -import { RiSearchLine } from '@remixicon/react' +import { RiCloseCircleFill, RiSearchLine } from '@remixicon/react' import cn from '@/utils/classnames' -import { XCircle } from '@/app/components/base/icons/src/vender/solid/general' type SearchInputProps = { placeholder?: string @@ -27,22 +26,19 @@ const SearchInput: FC = ({ return (
-
= ({ setInternalValue('') }} > - +
)} diff --git a/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx b/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx index 1615ea98cf..e409639049 100644 --- a/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx +++ b/web/app/components/datasets/documents/detail/completed/child-segment-list.tsx @@ -165,7 +165,7 @@ const ChildSegmentList: FC = ({ 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() diff --git a/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx b/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx index e6403fa12f..7bb8d2f54f 100644 --- a/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx +++ b/web/app/components/datasets/documents/detail/completed/common/chunk-content.tsx @@ -16,7 +16,7 @@ const Textarea: FC = React.memo(({ return (