Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show disabled in the keys list if key is disabled #2645

Merged
merged 8 commits into from
Nov 13, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const Keys: React.FC<Props> = async ({ keyAuthId, apiId }) => {
start: string | null;
roles: number;
permissions: number;
enabled: boolean;
environment: string | null;
}[];
};
Expand All @@ -48,6 +49,7 @@ export const Keys: React.FC<Props> = async ({ keyAuthId, apiId }) => {
name: curr.name,
start: curr.start,
roles: curr.roles.length,
enabled: curr.enabled,
permissions: curr.permissions.length,
environment: curr.environment,
});
Expand Down Expand Up @@ -120,6 +122,8 @@ export const Keys: React.FC<Props> = async ({ keyAuthId, apiId }) => {
{Intl.NumberFormat(undefined, { notation: "compact" }).format(k.roles)} Role
{k.roles !== 1 ? "s" : ""}
</Badge>

{!k.enabled && <Badge variant="secondary">Disabled</Badge>}
</div>

<div className="flex items-center justify-end col-span-1">
Expand Down