- TOTP_TEXTS (admin-ux.md wording) merged over @clocklimited/payload-2fa's long, informal texts; the project's i18n.translations still win; twoFactor.texts: false keeps the package's. Setup/verify screens titled "Two-step verification" / "Weryfikacja dwuetapowa" instead of "Payload". - CookieButton: position via --ipal-cookie-button-offset / -inset and --ipal-z-header; lifts above the footer (avoid, default COOKIE_BUTTON_AVOID) while it is on screen; side prop; className still replaces the look. - dev: a footer in the frontend layout to check the button against. Co-Authored-By: Claude Opus 5.5 <[email protected]>
29 lines
1.2 KiB
TypeScript
29 lines
1.2 KiB
TypeScript
import { notFound } from 'next/navigation.js'
|
|
import { CookieBanner } from '@intecion/ipal-kit/client'
|
|
import { SiteProviders } from '@intecion/ipal-kit/rsc'
|
|
|
|
import { getConfiguredLocales, getSiteShell } from '../../../lib/content.js'
|
|
import './styles.css'
|
|
|
|
type Props = { children: React.ReactNode; params: Promise<{ locale: string }> }
|
|
|
|
export default async function LocaleLayout({ children, params }: Props) {
|
|
const { locale } = await params
|
|
if (!(await getConfiguredLocales()).includes(locale)) notFound()
|
|
return (
|
|
<html lang={locale}>
|
|
<body>
|
|
<SiteProviders banner={<CookieBanner controls="switch" equalChoice settings="detailed" />} logEndpoint="/api/ipal/consent" shell={await getSiteShell(locale)} stats={{ locale }}>
|
|
<main>{children}</main>
|
|
{/* A footer with links in the bottom-left corner: CookieButton must not cover them. */}
|
|
<footer style={{ borderTop: '1px solid #e5e5e5', display: 'flex', gap: '1.5rem', marginTop: '60vh', padding: '1.5rem 1rem' }}>
|
|
<a href={`/${locale}`}>Home</a>
|
|
<a href={`/${locale}/kontakt`}>Kontakt</a>
|
|
<a href={`/${locale}/polityka-prywatnosci`}>Polityka prywatności</a>
|
|
</footer>
|
|
</SiteProviders>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|