Fix: Optimize table style #3221 (#9703)

### What problem does this PR solve?

Fix: Optimize table style
-Modify the style of the table scrollbar and remove unnecessary
scrollbars
-Adjust the header style of the table, add background color and
hierarchy
-Optimize the style of datasets and file tables
-Add a new background color variable

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-08-26 10:46:54 +08:00
committed by GitHub
parent 63b5c2292d
commit ae505e6165
8 changed files with 113 additions and 65 deletions

View File

@ -61,24 +61,40 @@ export function ActionCell({
}, [record, showMoveFileModal]);
return (
<section className="flex gap-4 items-center text-text-sub-title-invert">
<section className="flex gap-4 items-center text-text-sub-title-invert opacity-0 group-hover:opacity-100 transition-opacity">
<Button
variant="ghost"
variant="transparent"
className="border-none hover:bg-bg-card text-text-primary"
size={'sm'}
onClick={handleShowConnectToKnowledgeModal}
>
<Link2 />
</Button>
<Button variant="ghost" size={'sm'} onClick={handleShowMoveFileModal}>
<Button
variant="transparent"
className="border-none hover:bg-bg-card text-text-primary"
size={'sm'}
onClick={handleShowMoveFileModal}
>
<FolderInput />
</Button>
<Button variant="ghost" size={'sm'} onClick={handleShowFileRenameModal}>
<Button
variant="transparent"
className="border-none hover:bg-bg-card text-text-primary"
size={'sm'}
onClick={handleShowFileRenameModal}
>
<FolderPen />
</Button>
{isFolder || (
<Button variant={'ghost'} size={'sm'} onClick={onDownloadDocument}>
<Button
variant="transparent"
className="border-none hover:bg-bg-card text-text-primary"
size={'sm'}
onClick={onDownloadDocument}
>
<ArrowDownToLine />
</Button>
)}
@ -89,7 +105,11 @@ export function ActionCell({
documentName={record.name}
className="text-text-sub-title-invert"
>
<Button variant={'ghost'} size={'sm'}>
<Button
variant="transparent"
className="border-none hover:bg-bg-card text-text-primary"
size={'sm'}
>
<Eye />
</Button>
</NewDocumentLink>
@ -97,7 +117,8 @@ export function ActionCell({
{/* <DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size={'sm'}>
<Button variant="transparent"
className="border-none" size={'sm'}>
<EllipsisVertical />
</Button>
</DropdownMenuTrigger>
@ -118,7 +139,11 @@ export function ActionCell({
</DropdownMenuContent>
</DropdownMenu> */}
<ConfirmDeleteDialog>
<Button variant="ghost" size={'sm'}>
<Button
variant="transparent"
className="border-none hover:bg-bg-card text-text-primary"
size={'sm'}
>
<Trash2 />
</Button>
</ConfirmDeleteDialog>