mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 06:42:59 +00:00
switch links
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { LoginSettings } from "@zitadel/server";
|
||||
import Link from "next/link";
|
||||
|
||||
type Props = {
|
||||
loginName?: string;
|
||||
@@ -21,11 +22,12 @@ export default function ChooseSecondFactorToSetup({
|
||||
<div className="grid grid-cols-1 gap-5 w-full pt-4">
|
||||
{loginSettings.secondFactors.map((factor, i) => {
|
||||
return (
|
||||
<button
|
||||
key={"method-" + i}
|
||||
<div key={"method-" + i}>
|
||||
{factor === 1 && (
|
||||
<Link
|
||||
href="/otp/time-based/set"
|
||||
className="bg-background-light-400 dark:bg-background-dark-400 group block space-y-1.5 rounded-md px-5 py-3 hover:shadow-lg hover:dark:bg-white/10 border border-divider-light dark:border-divider-dark transition-all "
|
||||
>
|
||||
{factor === 1 && (
|
||||
<div className="font-medium flex items-center">
|
||||
<svg
|
||||
className="h-9 w-9 transform -translate-x-[2px] mr-4"
|
||||
@@ -70,8 +72,14 @@ C72,238.87917,85.87916,225,102.99997,225H248z"
|
||||
</svg>{" "}
|
||||
<span>Authenticator App</span>
|
||||
</div>
|
||||
</Link>
|
||||
)}
|
||||
|
||||
{factor === 2 && (
|
||||
<Link
|
||||
href="/u2f/set"
|
||||
className="bg-background-light-400 dark:bg-background-dark-400 group block space-y-1.5 rounded-md px-5 py-3 hover:shadow-lg hover:dark:bg-white/10 border border-divider-light dark:border-divider-dark transition-all "
|
||||
>
|
||||
<div className="font-medium flex items-center">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
@@ -89,8 +97,13 @@ C72,238.87917,85.87916,225,102.99997,225H248z"
|
||||
</svg>
|
||||
<span>Universal Second Factor</span>
|
||||
</div>
|
||||
</Link>
|
||||
)}
|
||||
{factor === 3 && (
|
||||
<Link
|
||||
href="/otp/email/set"
|
||||
className="bg-background-light-400 dark:bg-background-dark-400 group block space-y-1.5 rounded-md px-5 py-3 hover:shadow-lg hover:dark:bg-white/10 border border-divider-light dark:border-divider-dark transition-all "
|
||||
>
|
||||
<div className="font-medium flex items-center">
|
||||
<svg
|
||||
className="w-8 h-8 mr-4"
|
||||
@@ -109,8 +122,13 @@ C72,238.87917,85.87916,225,102.99997,225H248z"
|
||||
|
||||
<span>Code via Email</span>
|
||||
</div>
|
||||
</Link>
|
||||
)}
|
||||
{factor === 4 && (
|
||||
<Link
|
||||
href="/otp/sms/set"
|
||||
className="bg-background-light-400 dark:bg-background-dark-400 group block space-y-1.5 rounded-md px-5 py-3 hover:shadow-lg hover:dark:bg-white/10 border border-divider-light dark:border-divider-dark transition-all "
|
||||
>
|
||||
<div className="font-medium flex items-center">
|
||||
<svg
|
||||
className="w-8 h-8 mr-4"
|
||||
@@ -128,12 +146,9 @@ C72,238.87917,85.87916,225,102.99997,225H248z"
|
||||
</svg>
|
||||
<span>Code via SMS</span>
|
||||
</div>
|
||||
</Link>
|
||||
)}
|
||||
|
||||
{/* <div className="line-clamp-3 text-sm text-text-light-secondary-500 dark:text-text-dark-secondary-500">
|
||||
{factor}
|
||||
</div> */}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user