Skip to content

Commit e71708e

Browse files
authored
doc (#3383)
* doc * feat: navbar size * navbar ui
1 parent ddddd99 commit e71708e

File tree

7 files changed

+69
-50
lines changed

7 files changed

+69
-50
lines changed

docSite/content/zh-cn/docs/development/upgrading/4815.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ weight: 809
2323

2424
## 升级指南
2525

26-
- 更新 fastgpt 镜像 tag: v4.8.15-fix-team-permission
26+
- 更新 fastgpt 镜像 tag: v4.8.15-fix
2727
- 更新 fastgpt-pro 商业版镜像 tag: v4.8.15
2828
- Sandbox 镜像,可以不更新
2929

files/docker/docker-compose-milvus.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ services:
121121
restart: always
122122
fastgpt:
123123
container_name: fastgpt
124-
image: ghcr.io/labring/fastgpt:v4.8.15-fix-emb-page # git
125-
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix-emb-page # 阿里云
124+
image: ghcr.io/labring/fastgpt:v4.8.15-fix # git
125+
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix # 阿里云
126126
ports:
127127
- 3000:3000
128128
networks:

files/docker/docker-compose-pgvector.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ services:
7979
restart: always
8080
fastgpt:
8181
container_name: fastgpt
82-
image: ghcr.io/labring/fastgpt:v4.8.15-fix-emb-page # git
83-
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix-emb-page # 阿里云
82+
image: ghcr.io/labring/fastgpt:v4.8.15-fix # git
83+
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix # 阿里云
8484
ports:
8585
- 3000:3000
8686
networks:

files/docker/docker-compose-zilliz.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ services:
6060
restart: always
6161
fastgpt:
6262
container_name: fastgpt
63-
image: ghcr.io/labring/fastgpt:v4.8.15-fix-emb-page # git
64-
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix-emb-page # 阿里云
63+
image: ghcr.io/labring/fastgpt:v4.8.15-fix # git
64+
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix # 阿里云
6565
ports:
6666
- 3000:3000
6767
networks:
Loading

projects/app/src/components/Layout/navbar.tsx

+50-39
Original file line numberDiff line numberDiff line change
@@ -121,44 +121,55 @@ const Navbar = ({ unread }: { unread: number }) => {
121121
</Box>
122122
{/* 导航列表 */}
123123
<Box flex={1}>
124-
{navbarList.map((item) => (
125-
<Box
126-
key={item.link}
127-
{...itemStyles}
128-
{...(item.activeLink.includes(router.pathname)
129-
? {
130-
color: 'primary.600',
131-
bg: 'white',
132-
boxShadow:
133-
'0px 0px 1px 0px rgba(19, 51, 107, 0.08), 0px 4px 4px 0px rgba(19, 51, 107, 0.05)'
134-
}
135-
: {
136-
color: 'myGray.500',
137-
bg: 'transparent',
138-
_hover: {
139-
bg: isSecondNavbarPage ? 'white' : 'rgba(255,255,255,0.9)'
124+
{navbarList.map((item) => {
125+
const isActive = item.activeLink.includes(router.pathname);
126+
return (
127+
<Box
128+
key={item.link}
129+
{...itemStyles}
130+
{...(isActive
131+
? {
132+
bg: 'white',
133+
boxShadow:
134+
'0px 0px 1px 0px rgba(19, 51, 107, 0.08), 0px 4px 4px 0px rgba(19, 51, 107, 0.05)'
140135
}
141-
})}
142-
{...(item.link !== router.asPath
143-
? {
144-
onClick: () => router.push(item.link)
145-
}
146-
: {})}
147-
>
148-
<MyIcon
149-
name={
150-
item.activeLink.includes(router.pathname)
151-
? (item.activeIcon as any)
152-
: (item.icon as any)
153-
}
154-
width={'20px'}
155-
height={'20px'}
156-
/>
157-
<Box fontSize={'12px'} transform={'scale(0.9)'} mt={'5px'} lineHeight={1}>
158-
{item.label}
136+
: {
137+
bg: 'transparent',
138+
_hover: {
139+
bg: isSecondNavbarPage ? 'white' : 'rgba(255,255,255,0.9)'
140+
}
141+
})}
142+
{...(item.link !== router.asPath
143+
? {
144+
onClick: () => router.push(item.link)
145+
}
146+
: {})}
147+
>
148+
<MyIcon
149+
{...(isActive
150+
? {
151+
name: item.activeIcon as any,
152+
color: 'primary.600'
153+
}
154+
: {
155+
name: item.icon as any,
156+
color: 'myGray.400'
157+
})}
158+
width={'20px'}
159+
height={'20px'}
160+
/>
161+
<Box
162+
fontSize={'12px'}
163+
transform={'scale(0.9)'}
164+
mt={'5px'}
165+
lineHeight={1}
166+
color={isActive ? 'primary.700' : 'myGray.500'}
167+
>
168+
{item.label}
169+
</Box>
159170
</Box>
160-
</Box>
161-
))}
171+
);
172+
})}
162173
</Box>
163174

164175
{unread > 0 && (
@@ -191,10 +202,10 @@ const Navbar = ({ unread }: { unread: number }) => {
191202
{...itemStyles}
192203
{...hoverStyle}
193204
mt={0}
194-
color={'myGray.500'}
205+
color={'myGray.400'}
195206
height={'48px'}
196207
>
197-
<Avatar src={item.avatar} borderRadius={'md'} />
208+
<Avatar src={item.avatar} borderRadius={'md'} width={'26px'} height={'26px'} />
198209
</Link>
199210
</MyTooltip>
200211
))}
@@ -208,7 +219,7 @@ const Navbar = ({ unread }: { unread: number }) => {
208219
{...itemStyles}
209220
{...hoverStyle}
210221
mt={0}
211-
color={'myGray.500'}
222+
color={'myGray.400'}
212223
height={'48px'}
213224
>
214225
<MyIcon name={'common/gitInlight'} width={'26px'} height={'26px'} />

projects/app/src/components/core/chat/ChatContainer/ChatBox/components/VariableInput.tsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,16 @@ const VariableInput = ({
121121
const variablesForm = useContextSelector(ChatItemContext, (v) => v.variablesForm);
122122
const variableList = useContextSelector(ChatBoxContext, (v) => v.variableList);
123123

124-
const { handleSubmit: handleSubmitChat } = variablesForm;
124+
const { getValues, setValue, handleSubmit: handleSubmitChat } = variablesForm;
125+
126+
useEffect(() => {
127+
variableList.forEach((item) => {
128+
const val = getValues(`variables.${item.key}`);
129+
if (item.defaultValue !== undefined && (val === undefined || val === null || val === '')) {
130+
setValue(`variables.${item.key}`, item.defaultValue);
131+
}
132+
});
133+
}, [variableList]);
125134

126135
return (
127136
<Box py={3}>

0 commit comments

Comments
 (0)