mirror of
https://github.com/langgenius/dify.git
synced 2026-03-31 10:00:18 +08:00
fix: when credential unauthrozied display green color (#24572)
This commit is contained in:
parent
d5e6e38c58
commit
a7419d0aba
@ -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 (
|
||||
<>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user