From 05a78d4144bdb7047a808e5a10c74b0fdd69d5d5 Mon Sep 17 00:00:00 2001 From: "shiweisong.ssw" Date: Tue, 4 Jul 2023 18:29:54 +0800 Subject: [PATCH 1/3] feat: modify space list style --- datacenter/app/datastores/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datacenter/app/datastores/page.tsx b/datacenter/app/datastores/page.tsx index d6f2e5469..b42accfc2 100644 --- a/datacenter/app/datastores/page.tsx +++ b/datacenter/app/datastores/page.tsx @@ -114,8 +114,8 @@ const Index = () => { sx={{ width: '100%', height: '100%', - backgroundColor: mode === 'light' ? 'rgb(238, 240, 245)' : 'rgb(33, 33, 33)' }} + className='bg-[#EEF0F5] dark:bg-[#212121]' > { fontSize: '18px', fontWeight: 'bold', color: 'black', - backgroundColor: mode === 'light' ? 'rgb(224, 228, 237)' : 'rgb(72, 72, 72)', flexShrink: 0, flexGrow: 0, cursor: 'pointer', @@ -158,6 +157,7 @@ const Index = () => { } }} onClick={() => setIsAddKnowledgeSpaceModalShow(true)} + className='bg-[#E0E4ED] dark:bg-[#484848]' >Space {knowledgeSpaceList.map((item: any, index: number) => ( { padding: '30px 20px 40px', marginRight: '30px', marginBottom: '30px', - backgroundColor: mode === 'light' ? 'rgb(255, 255, 255)' : 'rgb(72, 72, 72)', borderTop: '3px solid rgb(82, 196, 26)', flexShrink: 0, flexGrow: 0, @@ -178,6 +177,7 @@ const Index = () => { onClick={() => { router.push(`/datastores/documents?name=${item.name}`); }} + className='bg-[#FFFFFF] dark:bg-[#484848]' > Date: Wed, 5 Jul 2023 11:03:37 +0800 Subject: [PATCH 2/3] fix: fix to static compile --- datacenter/hooks/useAgentChat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenter/hooks/useAgentChat.ts b/datacenter/hooks/useAgentChat.ts index d9c734e20..f14f72b05 100644 --- a/datacenter/hooks/useAgentChat.ts +++ b/datacenter/hooks/useAgentChat.ts @@ -49,7 +49,7 @@ import { useDialogueContext } from '@/app/context/dialogue'; const ctrl = new AbortController(); let buffer = ''; - await fetchEventSource(`${process.env.API_BASE_URL + "/api" + queryAgentURL}`, { + await fetchEventSource(`${process.env.API_BASE_URL ? process.env.API_BASE_URL : ''}${"/api" + queryAgentURL}`, { method: 'POST', headers: { 'Content-Type': 'application/json', From 1d50c7d3b8c6ed0efd27159d711f9f6fd2ad8915 Mon Sep 17 00:00:00 2001 From: "shiweisong.ssw" Date: Wed, 5 Jul 2023 11:34:55 +0800 Subject: [PATCH 3/3] feat: change the style --- datacenter/app/datastores/page.tsx | 41 ++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/datacenter/app/datastores/page.tsx b/datacenter/app/datastores/page.tsx index b42accfc2..5c399f780 100644 --- a/datacenter/app/datastores/page.tsx +++ b/datacenter/app/datastores/page.tsx @@ -4,10 +4,9 @@ import { useRouter } from 'next/navigation' import React, { useState, useEffect } from 'react' import { InboxOutlined } from '@ant-design/icons' import CheckCircleOutlinedIcon from '@mui/icons-material/CheckCircleOutlined' -import AddBoxOutlinedIcon from '@mui/icons-material/AddBoxOutlined'; import ContentPasteSearchOutlinedIcon from '@mui/icons-material/ContentPasteSearchOutlined'; import type { UploadProps } from 'antd' -import { message, Upload, Popover } from 'antd' +import { message, Upload } from 'antd' import { useColorScheme, Modal, @@ -115,7 +114,7 @@ const Index = () => { width: '100%', height: '100%', }} - className='bg-[#EEF0F5] dark:bg-[#212121]' + className='bg-[#F1F2F5] dark:bg-[#212121]' > { > { flexShrink: 0, flexGrow: 0, cursor: 'pointer', + borderRadius: '16px', '&: hover': { boxShadow: '0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);' } }} onClick={() => setIsAddKnowledgeSpaceModalShow(true)} - className='bg-[#E0E4ED] dark:bg-[#484848]' - >Space + className='bg-[#E9EBEE] dark:bg-[#484848]' + > + + + space + {knowledgeSpaceList.map((item: any, index: number) => ( { padding: '30px 20px 40px', marginRight: '30px', marginBottom: '30px', - borderTop: '3px solid rgb(82, 196, 26)', + borderTop: '4px solid rgb(84, 164, 248)', flexShrink: 0, flexGrow: 0, cursor: 'pointer', + borderRadius: '10px', '&: hover': { boxShadow: '0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);' } @@ -184,7 +205,7 @@ const Index = () => { marginBottom: '10px', fontWeight: 'bold', color: 'black' - }}>{item.name} + }}>{item.name} { > {item.vector_type} Vector @@ -214,7 +235,7 @@ const Index = () => { > {item.owner} Owner @@ -228,7 +249,7 @@ const Index = () => { > {item.docs || 0} Docs