A third settings mode next to 'inline' and 'modal': a large dialog where every consent category is a card with its on/off control, description and an expandable list of the cookies it covers (name, provider, purpose, duration), taken from Cookie Settings → Cookies — the same rows as <CookieTable>. The developer picks the mode with one prop; the component default stays 'inline', so existing sites are unchanged. Cookie Settings gets a localized detailLabels group (list labels, English fallback); getConsentTexts passes texts.cookies and texts.details, sharing the row mapping with getCookieTable. New classNames slots and data-ipal handles for the cards and lists. Docs for devs and agents: consent.md (modes compared, which to pick — new projects default to 'detailed' when the cookie list is filled), AGENT.md, PROGRAMISTA §2.8/§2.11/§6, skills ipal-setup, ipal-site, ipal-upgrade, ipal-locale-add, ipal-consent-check. Postgres/SQLite projects need migrate:create for the new fields. Co-Authored-By: Claude Opus 5.5 <[email protected]>
23 lines
841 B
TypeScript
23 lines
841 B
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>
|
|
</SiteProviders>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|