mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 23:37:32 +00:00
translated
This commit is contained in:
@@ -15,7 +15,6 @@ import {
|
|||||||
registerTOTP,
|
registerTOTP,
|
||||||
} from "@/lib/zitadel";
|
} from "@/lib/zitadel";
|
||||||
import { RegisterTOTPResponse } from "@zitadel/proto/zitadel/user/v2/user_service_pb";
|
import { RegisterTOTPResponse } from "@zitadel/proto/zitadel/user/v2/user_service_pb";
|
||||||
import { getLocale, getTranslations } from "next-intl/server";
|
|
||||||
import { headers } from "next/headers";
|
import { headers } from "next/headers";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
@@ -26,8 +25,6 @@ export default async function Page(props: {
|
|||||||
}) {
|
}) {
|
||||||
const params = await props.params;
|
const params = await props.params;
|
||||||
const searchParams = await props.searchParams;
|
const searchParams = await props.searchParams;
|
||||||
const locale = getLocale();
|
|
||||||
const t = await getTranslations({ locale, namespace: "otp" });
|
|
||||||
|
|
||||||
const { loginName, organization, sessionId, requestId, checkAfter } =
|
const { loginName, organization, sessionId, requestId, checkAfter } =
|
||||||
searchParams;
|
searchParams;
|
||||||
@@ -128,7 +125,9 @@ export default async function Page(props: {
|
|||||||
return (
|
return (
|
||||||
<DynamicTheme branding={branding}>
|
<DynamicTheme branding={branding}>
|
||||||
<div className="flex flex-col items-center space-y-4">
|
<div className="flex flex-col items-center space-y-4">
|
||||||
<h1>{t("set.title")}</h1>
|
<h1>
|
||||||
|
<Translated i18nKey="set.title" namespace="otp" />
|
||||||
|
</h1>
|
||||||
{!session && (
|
{!session && (
|
||||||
<div className="py-4">
|
<div className="py-4">
|
||||||
<Alert>
|
<Alert>
|
||||||
@@ -154,7 +153,12 @@ export default async function Page(props: {
|
|||||||
|
|
||||||
{totpResponse && "uri" in totpResponse && "secret" in totpResponse ? (
|
{totpResponse && "uri" in totpResponse && "secret" in totpResponse ? (
|
||||||
<>
|
<>
|
||||||
<p className="ztdl-p">{t("set.totpRegisterDescription")}</p>
|
<p className="ztdl-p">
|
||||||
|
<Translated
|
||||||
|
i18nKey="set.totpRegisterDescription"
|
||||||
|
namespace="otp"
|
||||||
|
/>
|
||||||
|
</p>
|
||||||
<div>
|
<div>
|
||||||
<TotpRegister
|
<TotpRegister
|
||||||
uri={totpResponse.uri as string}
|
uri={totpResponse.uri as string}
|
||||||
@@ -188,7 +192,7 @@ export default async function Page(props: {
|
|||||||
className="self-end"
|
className="self-end"
|
||||||
variant={ButtonVariants.Primary}
|
variant={ButtonVariants.Primary}
|
||||||
>
|
>
|
||||||
{t("set.submit")}
|
<Translated i18nKey="set.submit" namespace="otp" />
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -7,15 +7,12 @@ import { getSessionCookieById } from "@/lib/cookies";
|
|||||||
import { getServiceUrlFromHeaders } from "@/lib/service-url";
|
import { getServiceUrlFromHeaders } from "@/lib/service-url";
|
||||||
import { loadMostRecentSession } from "@/lib/session";
|
import { loadMostRecentSession } from "@/lib/session";
|
||||||
import { getBrandingSettings, getSession } from "@/lib/zitadel";
|
import { getBrandingSettings, getSession } from "@/lib/zitadel";
|
||||||
import { getLocale, getTranslations } from "next-intl/server";
|
|
||||||
import { headers } from "next/headers";
|
import { headers } from "next/headers";
|
||||||
|
|
||||||
export default async function Page(props: {
|
export default async function Page(props: {
|
||||||
searchParams: Promise<Record<string | number | symbol, string | undefined>>;
|
searchParams: Promise<Record<string | number | symbol, string | undefined>>;
|
||||||
}) {
|
}) {
|
||||||
const searchParams = await props.searchParams;
|
const searchParams = await props.searchParams;
|
||||||
const locale = getLocale();
|
|
||||||
const t = await getTranslations({ locale, namespace: "passkey" });
|
|
||||||
|
|
||||||
const { loginName, altPassword, requestId, organization, sessionId } =
|
const { loginName, altPassword, requestId, organization, sessionId } =
|
||||||
searchParams;
|
searchParams;
|
||||||
@@ -55,7 +52,9 @@ export default async function Page(props: {
|
|||||||
return (
|
return (
|
||||||
<DynamicTheme branding={branding}>
|
<DynamicTheme branding={branding}>
|
||||||
<div className="flex flex-col items-center space-y-4">
|
<div className="flex flex-col items-center space-y-4">
|
||||||
<h1>{t("verify.title")}</h1>
|
<h1>
|
||||||
|
<Translated i18nKey="verify.title" namespace="passkey" />
|
||||||
|
</h1>
|
||||||
|
|
||||||
{sessionFactors && (
|
{sessionFactors && (
|
||||||
<UserAvatar
|
<UserAvatar
|
||||||
@@ -65,7 +64,9 @@ export default async function Page(props: {
|
|||||||
searchParams={searchParams}
|
searchParams={searchParams}
|
||||||
></UserAvatar>
|
></UserAvatar>
|
||||||
)}
|
)}
|
||||||
<p className="ztdl-p mb-6 block">{t("verify.description")}</p>
|
<p className="ztdl-p mb-6 block">
|
||||||
|
<Translated i18nKey="verify.description" namespace="passkey" />
|
||||||
|
</p>
|
||||||
|
|
||||||
{!(loginName || sessionId) && (
|
{!(loginName || sessionId) && (
|
||||||
<Alert>
|
<Alert>
|
||||||
|
Reference in New Issue
Block a user