非管理员隐藏头部
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user