Admin follow-ups: localised stats tab title, scanner names, close label, favicon hint
- Statistics view: the browser-tab title follows the admin language.
Payload's custom-view meta.title is one plain string and its custom-view
metadata ignores i18n, so the view renders <DocumentTitle> (/admin) with the
translated title; it re-applies the title while the view is open because
Next streams the English metadata in after hydration. adminDocumentTitle()
adds admin.meta.titleSuffix the way Payload does.
- Cookie scanner: CookieIntegration.label may be { en, pl, ... }. The built-in
names without a product name come from the shared admin texts
(cookieIntegration*, cookieSourceProject); the scan endpoint answers in the
request's admin language and stored source names use the scanning editor's.
- Maintenance notice: getConstructionMode(locale) returns `locale`; the "x"
close button gets a screen-reader name "Close" / "Zamknij" (locale and
closeLabel props; constructionCloseLabel exported).
- Favicon: FaviconCheck (/admin, afterInput on Site settings -> Site icon)
warns in the admin language when the image is under 48x48 or not square,
without blocking the save; validateFaviconField shares faviconProblems().
- Docs, AGENT.md and skills: the above, plus Next.js 16.4.1 or later as the
minimum safe version (AGENT.md 4.11, ipal-setup, ipal-upgrade).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6f32ea4cdb
commit
546806fe39
@@ -52,7 +52,12 @@ Status changes work in the list's bulk edit too. Deleting review entries is admi
|
||||
by the plugin.
|
||||
|
||||
Labels are in English and Polish and follow the editor's admin language; `cookieScanner.labels` adds
|
||||
languages or changes text.
|
||||
languages or changes text. The built-in integrations without a product name (Cookie banner, Admin panel
|
||||
login, Language choice, Built-in statistics) take their names from the shared admin texts
|
||||
(`adminTexts`, keys `cookieIntegration*`, and `cookieSourceProject` for your own declarations), so the scan
|
||||
box lists them in the editor's language; the *Source* stored on a review entry is in the language of
|
||||
whoever ran the scan (English for a site check). Rename one through `cookieScanner.integrations`
|
||||
(`label: { en: '…', pl: '…' }`).
|
||||
|
||||
## What the plugin declares
|
||||
|
||||
@@ -120,7 +125,7 @@ run the tests, commit.
|
||||
| Key | Default | What it does |
|
||||
|---|---|---|
|
||||
| `declarations` | `[]` | The project's own cookies (custom embeds, chat, YouTube): `CookieDeclaration[]`, always part of a scan |
|
||||
| `integrations` | built-ins | `(defaults) => integrations` — filter, change or add `CookieIntegration`s (each: `key`, `label`, `declarations`, `isEnabled(ctx)`) |
|
||||
| `integrations` | built-ins | `(defaults) => integrations` — filter, change or add `CookieIntegration`s (each: `key`, `label` — one string or `{ en, pl, … }` per admin language, `declarations`, `isEnabled(ctx)`) |
|
||||
| `database` | `true` | `false` = no Open Cookie Database lookup |
|
||||
| `databaseCategories` | table above | Partial map from database category to consent category |
|
||||
| `access` | editor and up | `({ req }) => boolean` — who may scan, start a crawl and read its status |
|
||||
@@ -169,7 +174,7 @@ ipalKit({ cookieScanner: { integrations: (defaults) => [...defaults, chat] } })
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| `GET /api/ipal/cookie-scan` | `{ ok, integrations: [{ key, label }] }` — what a scan covers |
|
||||
| `GET /api/ipal/cookie-scan` | `{ ok, integrations: [{ key, label }] }` — what a scan covers; `label` in the admin language of the request |
|
||||
| `POST /api/ipal/cookie-scan` | body `{ names?: string[] \| string }` (newline or comma separated, up to 200, names with spaces, `;`, `,` or `=` dropped) → `{ ok, summary: { created, updated, unchanged, unknown }, integrations }` |
|
||||
| Access | editor and up (`userMeetsRole`; without `access` every logged-in account), or `cookieScanner.access`; otherwise `403` |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user