Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: when credential unauthrozied display green color (#24572)

非法操作a7419d0abafc
diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsx
index d57288db3f7..e67da77837f 100644
--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsx
@@ -81,12 +81,12 @@ const CredentialPanel = ({
}, [authorized, authRemoved, current_credential_name, hasCredential])
const color = useMemo(() => {
- if (authRemoved)
+ if (authRemoved || !hasCredential)
return 'red'
if (notAllowedToUse)
return 'gray'
return 'green'
- }, [authRemoved, notAllowedToUse])
+ }, [authRemoved, notAllowedToUse, hasCredential])
return (
<>