mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix: webapp sso setting may not the latest value when refresh (#7795)
This commit is contained in:
parent
8e311cc45c
commit
2c51e3a327
|
@ -128,7 +128,7 @@ const AppDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
|
||||||
if (e.status === 404)
|
if (e.status === 404)
|
||||||
router.replace('/apps')
|
router.replace('/apps')
|
||||||
})
|
})
|
||||||
}, [appId, isCurrentWorkspaceEditor])
|
}, [appId, isCurrentWorkspaceEditor, systemFeatures])
|
||||||
|
|
||||||
useUnmount(() => {
|
useUnmount(() => {
|
||||||
setAppDetail()
|
setAppDetail()
|
||||||
|
|
|
@ -95,7 +95,7 @@ const CardView: FC<ICardViewProps> = ({ appId }) => {
|
||||||
|
|
||||||
if (systemFeatures.enable_web_sso_switch_component) {
|
if (systemFeatures.enable_web_sso_switch_component) {
|
||||||
const [sso_err] = await asyncRunSafe<AppSSO>(
|
const [sso_err] = await asyncRunSafe<AppSSO>(
|
||||||
updateAppSSO({ id: appId, enabled: params.enable_sso }) as Promise<AppSSO>,
|
updateAppSSO({ id: appId, enabled: Boolean(params.enable_sso) }) as Promise<AppSSO>,
|
||||||
)
|
)
|
||||||
if (sso_err) {
|
if (sso_err) {
|
||||||
handleCallbackResult(sso_err)
|
handleCallbackResult(sso_err)
|
||||||
|
|
|
@ -134,8 +134,8 @@ function AppCard({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`shadow-xs border-[0.5px] rounded-lg border-gray-200 ${className ?? ''
|
className={
|
||||||
}`}
|
`shadow-xs border-[0.5px] rounded-lg border-gray-200 ${className ?? ''}`}
|
||||||
>
|
>
|
||||||
<div className={`px-6 py-5 ${customBgColor ?? bgColor} rounded-lg`}>
|
<div className={`px-6 py-5 ${customBgColor ?? bgColor} rounded-lg`}>
|
||||||
<div className="mb-2.5 flex flex-row items-start justify-between">
|
<div className="mb-2.5 flex flex-row items-start justify-between">
|
||||||
|
@ -176,7 +176,6 @@ function AppCard({
|
||||||
{isApp && <ShareQRCode content={isApp ? appUrl : apiUrl} selectorId={randomString(8)} className={'hover:bg-gray-200'} />}
|
{isApp && <ShareQRCode content={isApp ? appUrl : apiUrl} selectorId={randomString(8)} className={'hover:bg-gray-200'} />}
|
||||||
<CopyFeedback
|
<CopyFeedback
|
||||||
content={isApp ? appUrl : apiUrl}
|
content={isApp ? appUrl : apiUrl}
|
||||||
selectorId={randomString(8)}
|
|
||||||
className={'hover:bg-gray-200'}
|
className={'hover:bg-gray-200'}
|
||||||
/>
|
/>
|
||||||
{/* button copy link/ button regenerate */}
|
{/* button copy link/ button regenerate */}
|
||||||
|
@ -202,8 +201,8 @@ function AppCard({
|
||||||
onClick={() => setShowConfirmDelete(true)}
|
onClick={() => setShowConfirmDelete(true)}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className={`w-full h-full ${style.refreshIcon} ${genLoading ? style.generateLogo : ''
|
className={
|
||||||
}`}
|
`w-full h-full ${style.refreshIcon} ${genLoading ? style.generateLogo : ''}`}
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user