Browse Source

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

tags/1.8.0
非法操作 2 months ago
parent
commit
a7419d0aba
No account linked to committer's email address

+ 2
- 2
web/app/components/header/account-setting/model-provider-page/provider-added-card/credential-panel.tsx View File

@@ -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…
Cancel
Save