fix(login): use default titles for password pages (#10904)

# Which Problems Are Solved

This change shows the default titles for password pages instead of
dynamically showing the user name.

# How the Problems Are Solved

Both pages now show only the translated title text (verify.title and
change.title respectively) instead of falling back to showing the user's
display name.

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Max Peintner
2025-10-16 07:22:27 +02:00
committed by GitHub
parent 3a91b409c4
commit 19b744ca67
2 changed files with 6 additions and 2 deletions

View File

@@ -50,7 +50,9 @@ export default async function Page(props: { searchParams: Promise<Record<string
return ( return (
<DynamicTheme branding={branding}> <DynamicTheme branding={branding}>
<div className="flex flex-col space-y-4"> <div className="flex flex-col space-y-4">
<h1>{sessionFactors?.factors?.user?.displayName ?? <Translated i18nKey="change.title" namespace="password" />}</h1> <h1>
<Translated i18nKey="change.title" namespace="password" />
</h1>
<p className="ztdl-p mb-6 block"> <p className="ztdl-p mb-6 block">
<Translated i18nKey="change.description" namespace="password" /> <Translated i18nKey="change.description" namespace="password" />
</p> </p>

View File

@@ -61,7 +61,9 @@ export default async function Page(props: { searchParams: Promise<Record<string
return ( return (
<DynamicTheme branding={branding}> <DynamicTheme branding={branding}>
<div className="flex flex-col space-y-4"> <div className="flex flex-col space-y-4">
<h1>{sessionFactors?.factors?.user?.displayName ?? <Translated i18nKey="verify.title" namespace="password" />}</h1> <h1>
<Translated i18nKey="verify.title" namespace="password" />
</h1>
<p className="ztdl-p"> <p className="ztdl-p">
<Translated i18nKey="verify.description" namespace="password" /> <Translated i18nKey="verify.description" namespace="password" />
</p> </p>