非管理员隐藏头部

This commit is contained in:
2026-01-16 18:07:42 +08:00
parent bac3a97720
commit 40305bd4ca
3 changed files with 55 additions and 4 deletions

View File

@@ -22,6 +22,10 @@ export const useGlobalPublicStore = create<GlobalPublicStore>(set => ({
setSystemFeatures: (systemFeatures: SystemFeatures) => set(() => ({ systemFeatures })),
}))
/**
* GlobalPublicStoreProvider
* 初始化并提供系统特性systemFeatures统一设置品牌标题为“智能体平台”以用于页面标题拼接
*/
const GlobalPublicStoreProvider: FC<PropsWithChildren> = ({
children,
}) => {
@@ -32,7 +36,15 @@ const GlobalPublicStoreProvider: FC<PropsWithChildren> = ({
const { setSystemFeatures, setIsGlobalPending: setIsPending } = useGlobalPublicStore()
useEffect(() => {
if (data)
setSystemFeatures({ ...defaultSystemFeatures, ...data })
setSystemFeatures({
...defaultSystemFeatures,
...data,
branding: {
...defaultSystemFeatures.branding,
...(data.branding || {}),
application_title: '智能体平台',
},
})
}, [data, setSystemFeatures])
useEffect(() => {