mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-10 13:29:35 +00:00
feat(web): 🎨 Unified color theme, AntV light/dark theme switching, Antd first-screen style loading. (#1020)
Co-authored-by: 黄振洪 <hzh01509324@alibaba-inc.com> Co-authored-by: Aralhi <xiaoping0501@gmail.com>
This commit is contained in:
@@ -185,7 +185,7 @@ export default function DocPanel(props: IProps) {
|
||||
{hasMore && (
|
||||
<Divider>
|
||||
<span className="cursor-pointer" onClick={loadMoreDocuments}>
|
||||
{t('Load_More')}
|
||||
{t('Load_more')}
|
||||
</span>
|
||||
</Divider>
|
||||
)}
|
||||
|
@@ -82,7 +82,7 @@ export default function Segmentation(props: IProps) {
|
||||
}
|
||||
const strategy = strategies.filter((item) => item.strategy === name)[0];
|
||||
const newParam: any = {
|
||||
chunk_strategy: item.chunk_parameters.chunk_strategy,
|
||||
chunk_strategy: item?.chunk_parameters?.chunk_strategy,
|
||||
};
|
||||
if (strategy && strategy.parameters) {
|
||||
// remove unused parameter, otherwise api will failed.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { Popover, ConfigProvider, Button, Modal, Badge } from 'antd';
|
||||
import { useRouter } from 'next/router';
|
||||
import Image from 'next/image';
|
||||
import { DeleteTwoTone, MessageTwoTone, WarningOutlined } from '@ant-design/icons';
|
||||
import { DeleteFilled, MessageTwoTone, WarningOutlined } from '@ant-design/icons';
|
||||
import { ISpace } from '@/types/knowledge';
|
||||
import DocPanel from './doc-panel';
|
||||
import moment from 'moment';
|
||||
@@ -76,25 +76,24 @@ export default function SpaceCard(props: IProps) {
|
||||
}}
|
||||
>
|
||||
<Popover
|
||||
className="dark:hover:border-white transition-all hover:shadow-md bg-[#FFFFFF] dark:bg-[#484848] cursor-pointer rounded-[10px] border border-gray-200 border-solid"
|
||||
className="transition-all bg-white dark:bg-theme-dark-container cursor-pointer rounded"
|
||||
placement="bottom"
|
||||
trigger="click"
|
||||
content={<DocPanel space={space} onAddDoc={props.onAddDoc} onDeleteDoc={onDeleteDoc} />}
|
||||
>
|
||||
<Badge className="mr-4 mb-4 min-w-[200px] sm:w-60 lg:w-72" count={space.docs || 0}>
|
||||
<Badge className="mb-4 min-w-[200px] sm:w-60 lg:w-72" count={space.docs || 0}>
|
||||
<div className="flex justify-between mx-6 mt-3">
|
||||
<div className="text-lg font-bold text-black truncate">
|
||||
{renderVectorIcon(space.vector_type)}
|
||||
<span className="dark:text-white ml-2">{space?.name}</span>
|
||||
</div>
|
||||
<DeleteTwoTone
|
||||
<DeleteFilled
|
||||
className="text-[#ff1b2e] !text-lg"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
e.nativeEvent.stopImmediatePropagation();
|
||||
showDeleteConfirm();
|
||||
}}
|
||||
twoToneColor="#CD2029"
|
||||
className="!text-2xl"
|
||||
/>
|
||||
</div>
|
||||
<div className="text-sm mt-2 p-6 pt-2 h-40">
|
||||
|
Reference in New Issue
Block a user