Cookies: fill empty languages, and one Cookies entry in the admin
Every language filled (fillEmptyLocales, default on): text saved in one language goes to every language where the same field is still empty, never over a language's own text. Applies to the cookie list (purpose, duration) and the cookie review (purpose, duration). Scanner and approval writes give a language without its own text the default language's text. Building blocks: buildFillEmptyLocalesGlobalHook / CollectionHook, fillEmptyLocales, withFillLocales. One Cookies entry (cookieScanner.adminLayout, default combined): the Cookie banner global is now labelled Cookies and gets Review and approve (scan box and approval list inline) and Site check tabs, built from ui fields. Cookie review and Cookie check leave the navigation (admin.group false) but keep their pages, data and API. This is presentation only: no schema change and no migration, only generate:importmap. adminLayout separate keeps the old layout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a9e1adc03b
commit
b10c2dc0e3
@@ -4,7 +4,8 @@ import { userMeetsRole } from '../../modules/access/index.js'
|
||||
import { cookieSettingsFields } from './fields.js'
|
||||
|
||||
/**
|
||||
* Builds the CookieSettings global — consent banner copy managed by editors.
|
||||
* Builds the CookieSettings global ("Cookies" in the admin) — consent banner copy and the
|
||||
* cookie list, managed by editors. With the cookie scanner it also carries its tabs.
|
||||
* Public read (the banner needs it on the frontend for anonymous visitors).
|
||||
*/
|
||||
export function buildCookieSettings(): GlobalConfig {
|
||||
@@ -18,6 +19,6 @@ export function buildCookieSettings(): GlobalConfig {
|
||||
group: { en: 'Privacy', pl: 'Prywatność' },
|
||||
},
|
||||
fields: cookieSettingsFields,
|
||||
label: { en: 'Cookie banner', pl: 'Baner cookies' },
|
||||
label: { en: 'Cookies', pl: 'Cookies' },
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user