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

This commit is contained in:
非法操作 2025-08-26 23:24:09 +08:00 committed by GitHub
parent d5e6e38c58
commit a7419d0aba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

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 (
<>