From 232b9e97eb8a01cd459a387a9afe197136cfbe45 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Fri, 28 Apr 2023 18:39:32 +0100 Subject: [PATCH] Added the User/Bot badges to the scopes list --- .../components/integrations/ConnectButton.tsx | 55 ++++++++++++------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/apps/webapp/app/components/integrations/ConnectButton.tsx b/apps/webapp/app/components/integrations/ConnectButton.tsx index 43067ac5e..0359cf73f 100644 --- a/apps/webapp/app/components/integrations/ConnectButton.tsx +++ b/apps/webapp/app/components/integrations/ConnectButton.tsx @@ -15,6 +15,7 @@ import { } from "../primitives/Sheet"; import { Header3 } from "../primitives/text/Headers"; import { Input } from "../primitives/Input"; +import { Badge } from "../primitives/Badge"; export type Status = "loading" | "idle"; @@ -86,26 +87,40 @@ export function ConnectButton({ /> Select scopes - {apiAuthmethod.scopes.map((s) => { - const fieldName = `scopes[${s.name}]`; - return ( -
- -
- - {s.description && ( -

{s.description}

- )} -
-
- ); - })} +
+ {apiAuthmethod.scopes.map((s) => { + const fieldName = `scopes[${s.name}]`; + return ( +
+ +
+
+ + {s.annotations && + s.annotations.map((a) => ( + + {a.label} + + ))} +
+ {s.description && ( +

{s.description}

+ )} +
+
+ ); + })} +