mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-14 15:11:13 +00:00
app detail visibility (#5178)
This commit is contained in:
@@ -276,6 +276,10 @@ const Render = (props: { appId: string; isStandalone?: string }) => {
|
||||
setAppId(appId);
|
||||
}, [appId, setAppId]);
|
||||
|
||||
const currentApp = useMemo(() => {
|
||||
return myApps.find((app) => app._id === appId);
|
||||
}, [appId, myApps]);
|
||||
|
||||
const chatHistoryProviderParams = useMemo(
|
||||
() => ({ appId, source: ChatSourceEnum.online }),
|
||||
[appId]
|
||||
@@ -291,7 +295,7 @@ const Render = (props: { appId: string; isStandalone?: string }) => {
|
||||
return source === ChatSourceEnum.online ? (
|
||||
<ChatContextProvider params={chatHistoryProviderParams}>
|
||||
<ChatItemContextProvider
|
||||
showRouteToAppDetail={isStandalone !== '1'}
|
||||
showRouteToAppDetail={isStandalone !== '1' && !!currentApp?.permission.hasWritePer}
|
||||
showRouteToDatasetDetail={isStandalone !== '1'}
|
||||
isShowReadRawSource={true}
|
||||
isResponseDetail={true}
|
||||
|
Reference in New Issue
Block a user