feat(web): Index/model/space/tool ui upgrade

This commit is contained in:
zhaoying
2026-03-23 11:37:04 +08:00
parent 0775fad5f0
commit 4dbb2bf2e2
47 changed files with 1094 additions and 1123 deletions

View File

@@ -127,23 +127,23 @@ const ChatInput: FC<ChatInputProps> = ({
className={clsx(
"rb:size-5 rb:cursor-pointer rb:bg-cover rb:bg-[url('@/assets/images/conversation/pdf_disabled.svg')]",
file.type.includes('pdf')
? "rb:bg-[url('src/assets/images/file/pdf.svg')]"
? "rb:bg-[url('@/assets/images/file/pdf.svg')]"
: (file.type.includes('excel') || file.type.includes('spreadsheetml.sheet'))
? "rb:bg-[url('src/assets/images/file/excel.svg')]"
? "rb:bg-[url('@/assets/images/file/excel.svg')]"
: file.type.includes('csv')
? "rb:bg-[url('src/assets/images/file/csv.svg')]"
? "rb:bg-[url('@/assets/images/file/csv.svg')]"
: file.type.includes('html')
? "rb:bg-[url('src/assets/images/file/html.svg')]"
? "rb:bg-[url('@/assets/images/file/html.svg')]"
: file.type.includes('json')
? "rb:bg-[url('src/assets/images/file/json.svg')]"
? "rb:bg-[url('@/assets/images/file/json.svg')]"
: file.type.includes('ppt')
? "rb:bg-[url('src/assets/images/file/ppt.svg')]"
? "rb:bg-[url('@/assets/images/file/ppt.svg')]"
: file.type.includes('text')
? "rb:bg-[url('src/assets/images/file/txt.svg')]"
? "rb:bg-[url('@/assets/images/file/txt.svg')]"
: file.type.includes('markdown')
? "rb:bg-[url('src/assets/images/file/md.svg')]"
? "rb:bg-[url('@/assets/images/file/md.svg')]"
: (file.type.includes('doc') || file.type.includes('docx') || file.type.includes('word') || file.type.includes('wordprocessingml.document'))
? "rb:bg-[url('src/assets/images/file/word.svg')]"
? "rb:bg-[url('@/assets/images/file/word.svg')]"
: null
)}
></div>

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-02 15:21:14
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-24 14:59:53
* @Last Modified time: 2026-03-20 20:24:43
*/
/**
* RbCard Component
@@ -23,6 +23,7 @@ import clsx from 'clsx';
/** Props interface for RbCard component */
interface RbCardProps extends CardProps {
isNeedTooltip?: boolean;
children?: ReactNode;
/** Custom avatar component */
avatarText?: string;
@@ -32,16 +33,22 @@ interface RbCardProps extends CardProps {
/** Click handler */
onClick?: () => void;
footer?: ReactNode;
headerClassName?: string;
titleClassName?: string;
}
/** Custom card component with flexible styling and header options */
const RbCard: FC<RbCardProps> = ({
isNeedTooltip = true,
title,
children,
avatarText,
avatarClassName,
avatarUrl,
footer,
headerClassName,
titleClassName,
className,
...props
}) => {
return (
@@ -54,17 +61,23 @@ const RbCard: FC<RbCardProps> = ({
: avatarText
? <Flex align="center" justify="center" className={clsx(avatarClassName, "rb:size-11 rb:rounded-lg rb:text-[24px] rb:text-[#ffffff] rb:bg-[#155EEF]")}>{avatarText}</Flex> : null
}
<Tooltip title={title}>
<div className="rb:flex-1 rb:leading-5.5 rb:min-w-0 rb:whitespace-break-spaces rb:wrap-break-word rb:line-clamp-2">
{isNeedTooltip
? <Tooltip title={title}>
<div className={`rb:flex-1 rb:leading-5.5 rb:min-w-0 rb:whitespace-break-spaces rb:wrap-break-word rb:line-clamp-2 ${titleClassName}`}>
{title}
</div>
</Tooltip>
: <div className="rb:flex-1 rb:leading-5.5 rb:min-w-0 rb:whitespace-break-spaces rb:wrap-break-word rb:line-clamp-2">
{title}
</div>
</Tooltip>
}
</Flex>}
classNames={{
header: 'rb:text-[16px] rb:p-[16px_16px_8px_16px]! rb:border-0!',
body: 'rb:p-4! rb:bg-white!',
header: `rb:text-[16px] rb:p-[16px_16px_8px_16px]! rb:border-0! ${headerClassName}`,
body: 'rb:p-4! rb:pt-2! rb:bg-white!',
}}
className="rb:hover:shadow-[0px_2px_8px_0px_rgba(23,23,25,0.16)]! rb:group"
className={`rb:hover:shadow-[0px_2px_8px_0px_rgba(23,23,25,0.16)]! rb:group ${className}`}
>
{children}

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-02 15:24:23
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-10 14:59:39
* @Last Modified time: 2026-03-23 11:35:33
*/
/**
* SearchInput Component
@@ -22,7 +22,7 @@ import { Input, type InputProps } from 'antd';
import { useTranslation } from 'react-i18next';
/** Props interface for SearchInput component */
interface SearchInputProps {
interface SearchInputProps extends InputProps {
/** Placeholder text */
placeholder?: string;
/** Callback fired when search value changes */