|
|
|
@ -19,7 +19,7 @@ import { useStore as useAppStore } from '@/app/components/app/store'
|
|
|
|
import { ToastContext } from '@/app/components/base/toast'
|
|
|
|
import { ToastContext } from '@/app/components/base/toast'
|
|
|
|
import AppsContext, { useAppContext } from '@/context/app-context'
|
|
|
|
import AppsContext, { useAppContext } from '@/context/app-context'
|
|
|
|
import { useProviderContext } from '@/context/provider-context'
|
|
|
|
import { useProviderContext } from '@/context/provider-context'
|
|
|
|
import { copyApp, deleteApp, exportAppConfig, updateAppInfo } from '@/service/apps'
|
|
|
|
import { copyApp, deleteApp, exportAppConfig, fetchAppDetail, updateAppInfo } from '@/service/apps'
|
|
|
|
import DuplicateAppModal from '@/app/components/app/duplicate-modal'
|
|
|
|
import DuplicateAppModal from '@/app/components/app/duplicate-modal'
|
|
|
|
import type { DuplicateAppModalProps } from '@/app/components/app/duplicate-modal'
|
|
|
|
import type { DuplicateAppModalProps } from '@/app/components/app/duplicate-modal'
|
|
|
|
import CreateAppModal from '@/app/components/explore/create-app-modal'
|
|
|
|
import CreateAppModal from '@/app/components/explore/create-app-modal'
|
|
|
|
@ -185,6 +185,12 @@ const AppInfo = ({ expand }: IAppInfoProps) => {
|
|
|
|
setShowAccessControl(true)
|
|
|
|
setShowAccessControl(true)
|
|
|
|
setOpen(false)
|
|
|
|
setOpen(false)
|
|
|
|
}, [appDetail])
|
|
|
|
}, [appDetail])
|
|
|
|
|
|
|
|
const handleAccessControlUpdate = useCallback(() => {
|
|
|
|
|
|
|
|
fetchAppDetail({ url: '/apps', id: appDetail!.id }).then((res) => {
|
|
|
|
|
|
|
|
setAppDetail(res)
|
|
|
|
|
|
|
|
setShowAccessControl(false)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}, [appDetail, setAppDetail])
|
|
|
|
|
|
|
|
|
|
|
|
const { isCurrentWorkspaceEditor } = useAppContext()
|
|
|
|
const { isCurrentWorkspaceEditor } = useAppContext()
|
|
|
|
|
|
|
|
|
|
|
|
@ -481,7 +487,7 @@ const AppInfo = ({ expand }: IAppInfoProps) => {
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
showAccessControl && <AccessControl app={appDetail}
|
|
|
|
showAccessControl && <AccessControl app={appDetail}
|
|
|
|
onConfirm={() => { setShowAccessControl(false) }}
|
|
|
|
onConfirm={handleAccessControlUpdate}
|
|
|
|
onClose={() => { setShowAccessControl(false) }} />
|
|
|
|
onClose={() => { setShowAccessControl(false) }} />
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|