Merge pull request #456 from zitadel/qa

promote qa to prod
This commit is contained in:
Elio Bischof
2025-05-09 20:43:18 +02:00
committed by GitHub
3 changed files with 34 additions and 27 deletions

View File

@@ -15,7 +15,7 @@ export default async function Page(props: {
}) {
const searchParams = await props.searchParams;
const locale = getLocale();
const t = await getTranslations({ locale, namespace: "device" });
const t = await getTranslations({ locale });
const userCode = searchParams?.user_code;
const requestId = searchParams?.requestId;
@@ -66,10 +66,16 @@ export default async function Page(props: {
<DynamicTheme branding={branding}>
<div className="flex flex-col items-center space-y-4">
<h1>
{t("request.title", { appName: deviceAuthorizationRequest?.appName })}
{t("device.request.title", {
appName: deviceAuthorizationRequest?.appName,
})}
</h1>
<p className="ztdl-p">{t("request.description")}</p>
<p className="ztdl-p">
{t("device.request.description", {
appName: deviceAuthorizationRequest?.appName,
})}
</p>
<ConsentScreen
deviceAuthorizationRequestId={deviceAuthorizationRequest?.id}

View File

@@ -37,13 +37,9 @@ export default async function Page(props: {
return (
<DynamicTheme branding={branding}>
<div className="flex flex-col items-center space-y-4">
{!userCode && (
<>
<h1>{t("usercode.title")}</h1>
<p className="ztdl-p">{t("usercode.description")}</p>
<DeviceCodeForm userCode={userCode}></DeviceCodeForm>
</>
)}
<h1>{t("usercode.title")}</h1>
<p className="ztdl-p">{t("usercode.description")}</p>
<DeviceCodeForm userCode={userCode}></DeviceCodeForm>
</div>
</DynamicTheme>
);

View File

@@ -43,28 +43,33 @@ export function ConsentScreen({
}
}
const scopes = scope?.filter((s) => !!s);
return (
<div className="pt-4 w-full flex flex-col items-center space-y-4">
<ul className="list-disc space-y-2 w-full">
{scope
?.filter((s) => !!s)
.map((s) => {
const translationKey = `device.scope.${s}`;
const description = t(translationKey, null);
{scopes?.length === 0 && (
<span className="w-full text-sm flex flex-row items-center bg-background-light-400 dark:bg-background-dark-400 border border-divider-light py-2 px-4 rounded-md transition-all">
{t("device.scope.openid")}
</span>
)}
{scopes?.map((s) => {
const translationKey = `device.scope.${s}`;
const description = t(translationKey, null);
// Check if the key itself is returned and provide a fallback
const resolvedDescription =
description === translationKey ? "" : description;
// Check if the key itself is returned and provide a fallback
const resolvedDescription =
description === translationKey ? "" : description;
return (
<li
key={s}
className="w-full text-sm flex flex-row items-center bg-background-light-400 dark:bg-background-dark-400 border border-divider-light py-2 px-4 rounded-md transition-all"
>
<span>{resolvedDescription}</span>
</li>
);
})}
return (
<li
key={s}
className="w-full text-sm flex flex-row items-center bg-background-light-400 dark:bg-background-dark-400 border border-divider-light py-2 px-4 rounded-md transition-all"
>
<span>{resolvedDescription}</span>
</li>
);
})}
</ul>
<p className="ztdl-p text-xs text-left">