From e71708ee76f9a4d182f13dbb64707111f19124a0 Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Thu, 12 Dec 2024 17:54:38 +0800 Subject: [PATCH] doc (#3383) * doc * feat: navbar size * navbar ui --- .../zh-cn/docs/development/upgrading/4815.md | 2 +- files/docker/docker-compose-milvus.yml | 4 +- files/docker/docker-compose-pgvector.yml | 4 +- files/docker/docker-compose-zilliz.yml | 4 +- .../common/Icon/icons/phoneTabbar/tool.svg | 5 +- projects/app/src/components/Layout/navbar.tsx | 89 +++++++++++-------- .../ChatBox/components/VariableInput.tsx | 11 ++- 7 files changed, 69 insertions(+), 50 deletions(-) diff --git a/docSite/content/zh-cn/docs/development/upgrading/4815.md b/docSite/content/zh-cn/docs/development/upgrading/4815.md index 44518c10a0a5..4779c4ef7f0b 100644 --- a/docSite/content/zh-cn/docs/development/upgrading/4815.md +++ b/docSite/content/zh-cn/docs/development/upgrading/4815.md @@ -23,7 +23,7 @@ weight: 809 ## 升级指南 -- 更新 fastgpt 镜像 tag: v4.8.15-fix-team-permission +- 更新 fastgpt 镜像 tag: v4.8.15-fix - 更新 fastgpt-pro 商业版镜像 tag: v4.8.15 - Sandbox 镜像,可以不更新 diff --git a/files/docker/docker-compose-milvus.yml b/files/docker/docker-compose-milvus.yml index 2b7c374a137b..a1e1377c207a 100644 --- a/files/docker/docker-compose-milvus.yml +++ b/files/docker/docker-compose-milvus.yml @@ -121,8 +121,8 @@ services: restart: always fastgpt: container_name: fastgpt - image: ghcr.io/labring/fastgpt:v4.8.15-fix-emb-page # git - # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix-emb-page # 阿里云 + image: ghcr.io/labring/fastgpt:v4.8.15-fix # git + # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix # 阿里云 ports: - 3000:3000 networks: diff --git a/files/docker/docker-compose-pgvector.yml b/files/docker/docker-compose-pgvector.yml index 1de0e9a5bc12..7e967fde4de2 100644 --- a/files/docker/docker-compose-pgvector.yml +++ b/files/docker/docker-compose-pgvector.yml @@ -79,8 +79,8 @@ services: restart: always fastgpt: container_name: fastgpt - image: ghcr.io/labring/fastgpt:v4.8.15-fix-emb-page # git - # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix-emb-page # 阿里云 + image: ghcr.io/labring/fastgpt:v4.8.15-fix # git + # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix # 阿里云 ports: - 3000:3000 networks: diff --git a/files/docker/docker-compose-zilliz.yml b/files/docker/docker-compose-zilliz.yml index 2829b634618a..1371971875e9 100644 --- a/files/docker/docker-compose-zilliz.yml +++ b/files/docker/docker-compose-zilliz.yml @@ -60,8 +60,8 @@ services: restart: always fastgpt: container_name: fastgpt - image: ghcr.io/labring/fastgpt:v4.8.15-fix-emb-page # git - # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix-emb-page # 阿里云 + image: ghcr.io/labring/fastgpt:v4.8.15-fix # git + # image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix # 阿里云 ports: - 3000:3000 networks: diff --git a/packages/web/components/common/Icon/icons/phoneTabbar/tool.svg b/packages/web/components/common/Icon/icons/phoneTabbar/tool.svg index b77170d86143..440720cb0c6d 100644 --- a/packages/web/components/common/Icon/icons/phoneTabbar/tool.svg +++ b/packages/web/components/common/Icon/icons/phoneTabbar/tool.svg @@ -1,4 +1,3 @@ - - + + \ No newline at end of file diff --git a/projects/app/src/components/Layout/navbar.tsx b/projects/app/src/components/Layout/navbar.tsx index f03df990587d..509d8775c23f 100644 --- a/projects/app/src/components/Layout/navbar.tsx +++ b/projects/app/src/components/Layout/navbar.tsx @@ -121,44 +121,55 @@ const Navbar = ({ unread }: { unread: number }) => { {/* 导航列表 */} - {navbarList.map((item) => ( - { + const isActive = item.activeLink.includes(router.pathname); + return ( + router.push(item.link) - } - : {})} - > - - - {item.label} + : { + bg: 'transparent', + _hover: { + bg: isSecondNavbarPage ? 'white' : 'rgba(255,255,255,0.9)' + } + })} + {...(item.link !== router.asPath + ? { + onClick: () => router.push(item.link) + } + : {})} + > + + + {item.label} + - - ))} + ); + })} {unread > 0 && ( @@ -191,10 +202,10 @@ const Navbar = ({ unread }: { unread: number }) => { {...itemStyles} {...hoverStyle} mt={0} - color={'myGray.500'} + color={'myGray.400'} height={'48px'} > - + ))} @@ -208,7 +219,7 @@ const Navbar = ({ unread }: { unread: number }) => { {...itemStyles} {...hoverStyle} mt={0} - color={'myGray.500'} + color={'myGray.400'} height={'48px'} > diff --git a/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/VariableInput.tsx b/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/VariableInput.tsx index 589db1051b58..2b07a8c304a0 100644 --- a/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/VariableInput.tsx +++ b/projects/app/src/components/core/chat/ChatContainer/ChatBox/components/VariableInput.tsx @@ -121,7 +121,16 @@ const VariableInput = ({ const variablesForm = useContextSelector(ChatItemContext, (v) => v.variablesForm); const variableList = useContextSelector(ChatBoxContext, (v) => v.variableList); - const { handleSubmit: handleSubmitChat } = variablesForm; + const { getValues, setValue, handleSubmit: handleSubmitChat } = variablesForm; + + useEffect(() => { + variableList.forEach((item) => { + const val = getValues(`variables.${item.key}`); + if (item.defaultValue !== undefined && (val === undefined || val === null || val === '')) { + setValue(`variables.${item.key}`, item.defaultValue); + } + }); + }, [variableList]); return (