From 74aae0ce155ca0a5a056ccc24ccff564a6df1ed7 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Mon, 17 Mar 2025 07:03:02 -0700 Subject: [PATCH] Put 2fa under collapsible (#1951) Co-authored-by: Muhammed Salih Altun --- .../credentials/PasswordCredentialContent.tsx | 254 +++++++++--------- 1 file changed, 134 insertions(+), 120 deletions(-) diff --git a/skyvern-frontend/src/routes/credentials/PasswordCredentialContent.tsx b/skyvern-frontend/src/routes/credentials/PasswordCredentialContent.tsx index cb34c0c9..c4ecf65d 100644 --- a/skyvern-frontend/src/routes/credentials/PasswordCredentialContent.tsx +++ b/skyvern-frontend/src/routes/credentials/PasswordCredentialContent.tsx @@ -1,4 +1,10 @@ import { QRCodeIcon } from "@/components/icons/QRCodeIcon"; +import { + Accordion, + AccordionContent, + AccordionItem, + AccordionTrigger, +} from "@/components/ui/accordion"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Separator } from "@/components/ui/separator"; @@ -108,128 +114,136 @@ function PasswordCredentialContent({ -
-
-

Two-Factor Authentication

-

- Set up Skyvern to automatically retrieve two-factor authentication - codes. -

-
-
-
setTotpMethod("authenticator")} - > - - -
-
setTotpMethod("email")} - > - - -
-
setTotpMethod("text")} - > - - -
-
- {(totpMethod === "text" || totpMethod === "email") && ( -

- - Contact us to set up two-factor authentication in workflows - {" "} - or{" "} - - see our documentation on how to set up two-factor authentication - in workflows - {" "} - to get started. -

- )} - {totpMethod === "authenticator" && ( -
-
-
- + + + + Two-Factor Authentication + + +
+

+ Set up Skyvern to automatically retrieve two-factor + authentication codes. +

+
+
setTotpMethod("authenticator")} + > + + +
+
setTotpMethod("email")} + > + + +
+
setTotpMethod("text")} + > + + +
- - onChange({ - name, - username, - password, - totp: e.target.value, - }) - } - /> + {(totpMethod === "text" || totpMethod === "email") && ( +

+ + Contact us to set up two-factor authentication in workflows + {" "} + or{" "} + + see our documentation on how to set up two-factor + authentication in workflows + {" "} + to get started. +

+ )} + {totpMethod === "authenticator" && ( +
+
+
+ +
+ + onChange({ + name, + username, + password, + totp: e.target.value, + }) + } + /> +
+

+ You need to find the authenticator secret from the website + where you are using the credential. Here are some guides + from popular authenticator apps:{" "} + + Bitwarden + + {", "} + + 1Password + + {", and "} + + LastPass + + {"."} +

+
+ )}
-

- You need to find the authenticator secret from the website where - you are using the credential. Here are some guides from popular - authenticator apps:{" "} - - Bitwarden - - {", "} - - 1Password - - {", and "} - - LastPass - - {"."} -

-
- )} -
+ + +
); }