Merge claude/login-page-whitelabel-616f3d: the sign-in logo as 1.17.0's login screen shows it (SVG as an image, no plate)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@@ -1171,7 +1171,7 @@ project → **plugin gap**, not a copy.
|
||||
| Mail | `email: mailAdapter()` + `serverURL` — mail works with no other setup, through the Intecion mail service; SMTP in the panel only when the client asks; your own mail: `payload.sendEmail` (`withMailKind` when it is account mail); never a second transport in the project. §7.2 | email.md |
|
||||
| Env validation, health | `assertEnv(iaplEnvRules({…}))` (`/env`), `healthRoute` | env.md |
|
||||
| 2FA, white-label, headers | `twoFactor: { issuer, plugin: payloadTotp }`, `whiteLabel`, `buildSecurityHeaders` | security.md, white-label.md |
|
||||
| Sign-in screens (login, forgot / reset password, first user, logout, the 2FA screens): a dark panel with the client's logo or the site's name beside the form, language links, both themes, phone | on with `whiteLabel` (`signIn`); a NEW site: `whiteLabel: { signIn: { allScreens: true } }` + `pnpm payload generate:importmap` (adds the provider `SignInLook`; without it only login and the 2FA screens get the look, through `AdminLogo` / `SafeTotpView`). Logo and name come from Site settings (no env var, no new field, no migration). The logo is a bitmap (JPEG, PNG, WebP, AVIF, GIF; an SVG logo shows the name unless `svgLogo: true`), checked by its bytes before it is printed (`checkLogo`), without a plate (`logoPlate: true` for a logo with dark letters). Options: `accent` (hex), `languages: false`; `signIn: false` = Payload's screens. Name / logo / icon are admin-only with the look (`brandAccess: 'editor'` = as before). Never build a login page, a custom `graphics.Logo` or login CSS by hand. Check: `curl -s $URL/admin/login \| grep -c iapl-signin__label` ≥ 1; `curl -si "$URL/api/ipal/admin-language?lng=xx"` → 400 | white-label.md → "The sign-in screens" |
|
||||
| Sign-in screens (login, forgot / reset password, first user, logout, the 2FA screens): a dark panel with the client's logo or the site's name beside the form, language links, both themes, phone | on with `whiteLabel` (`signIn`); a NEW site: `whiteLabel: { signIn: { allScreens: true } }` + `pnpm payload generate:importmap` (adds the provider `SignInLook`; without it only login and the 2FA screens get the look, through `AdminLogo` / `SafeTotpView`). Logo and name come from Site settings (no env var, no new field, no migration). The logo is whatever Site settings → Logo holds, an SVG too, as `<img>` — the same as on the login screen before (`svgLogo: false` refuses SVG); a file that is gone gives the name instead of a broken picture (`checkLogo`); no plate (`logoPlate: true` for a logo with dark letters). Options: `accent` (hex), `languages: false`; `signIn: false` = Payload's screens. Name / logo / icon are admin-only with the look (`brandAccess: 'editor'` = as before). Never build a login page, a custom `graphics.Logo` or login CSS by hand. Check: `curl -s $URL/admin/login \| grep -c iapl-signin__label` ≥ 1; `curl -si "$URL/api/ipal/admin-language?lng=xx"` → 400 | white-label.md → "The sign-in screens" |
|
||||
| Panel link preview + noindex (site name, description, preview image, technology support credit) | on by default (`adminMeta`, `agency`) — do not hand-write `admin.meta` for it; override single keys in `admin.meta` or `adminMeta: { … }` | white-label.md |
|
||||
| Rate limit (forms, MCP, search) | built in; IP from `IAPL_IP_HEADER`; several instances → `setRateLimitStore` | forms.md |
|
||||
|
||||
|
||||
@@ -64,13 +64,13 @@ description: Complete map of everything @intecion/ipal-kit provides — every ia
|
||||
| `whiteLabel.logoField` / `iconField` / `nameField` | `'logo'` / `'favicon'` / `'siteName'` | fields in Site settings | any upload/text field |
|
||||
| `whiteLabel.titleSuffix` | none | `admin.meta.titleSuffix` (tab title) | — |
|
||||
| `whiteLabel.credit` | on | `IntecionCredit` in `afterLogin` and `afterNavLinks`: "Technology support: Intecion.com" (en/pl, from `agency`) | `false`; `{ text, url }` overrides |
|
||||
| `whiteLabel.signIn` | on (with `whiteLabel`) | the sign-in look: a dark panel with the client's logo (Site settings → Logo: JPEG / PNG / WebP / AVIF / GIF, fetched and checked by its bytes before it is printed, ≤ 512 KB, fits 240 × 72, no plate) or the site's name beside the form, "Administration panel", language links; both themes, a band above the form on a phone. Login, the 2FA screens and e-mail verification get it through `AdminLogo` / `SafeTotpView` (already in the import map: an upgrade needs no edit). No env var, no new field, no migration | `false` = Payload's own screens |
|
||||
| `whiteLabel.signIn` | on (with `whiteLabel`) | the sign-in look: a dark panel with the client's logo (Site settings → Logo, any picture it holds — an SVG too — as `<img>`, exactly what the login screen showed before; fits 240 × 72, no plate) or the site's name beside the form, "Administration panel", language links; both themes, a band above the form on a phone. Login, the 2FA screens and e-mail verification get it through `AdminLogo` / `SafeTotpView` (already in the import map: an upgrade needs no edit). No env var, no new field, no migration | `false` = Payload's own screens |
|
||||
| `whiteLabel.signIn.allScreens` | `false` (the starter writes `true`) | the look on forgot / reset password, create first user, logout and "unauthorized" too: adds the provider `SignInLook` — ONE new import-map entry, run `pnpm payload generate:importmap`. Production start: when `importMap.js` on disk lacks it, the provider is left out and the log says `[iapl] The sign-in look covers only the login and 2FA screens …` | `true` |
|
||||
| `whiteLabel.signIn.accent` | `#0070c0` | hex colour of the button, links and focus ring (anything that is not a hex colour is ignored); or CSS variables `--iapl-signin-*` on `:root` in the admin's `custom.scss` | `'#0b6e4f'` |
|
||||
| `whiteLabel.signIn.logoPlate` | `false` (the logo straight on the dark panel: upload one that works on dark) | `true` = a white plate behind the logo (dark letters) | — |
|
||||
| `whiteLabel.signIn.checkLogo` | on | the logo's file is fetched as an anonymous visitor gets it and its first bytes read (10-minute memory); a deleted / broken / non-image / > 512 KB file → the site's name; nothing answers → the upload document is believed | `false` = no fetch |
|
||||
| `whiteLabel.signIn.checkLogo` | on | only against a broken picture: the logo's address is asked once as an anonymous visitor would (no redirect followed, 4 s, ≤ 512 KB read, 10-minute memory); a file that is gone (404 / 410) or is no picture (HTML, PDF) → the site's name; anything else (nothing answers, a redirect, another status, over 512 KB) → the upload is believed | `false` = no fetch |
|
||||
| `whiteLabel.signIn.languages` | shown with 2+ admin languages | links on the panel; `GET /api/ipal/admin-language?lng=<code>` writes Payload's `payload-lng` cookie and redirects (303) back to the admin path of the `Referer`; unknown language → 400 | `false` = no links, no endpoint |
|
||||
| `whiteLabel.signIn.svgLogo` | `false`: an SVG logo is NOT shown on the sign-in screens (the site's name is) — tell the client to upload a PNG / WebP logo | `true` = shown as a picture (`<img>` runs no script) | — |
|
||||
| `whiteLabel.signIn.svgLogo` | `true`: an SVG logo is shown as a picture (`<img>` runs no script), as on the login screen before | `false` = an SVG logo is not shown on the sign-in screens (the site's name is) | — |
|
||||
| `whiteLabel.brandAccess` | `'admin'` with the sign-in look (else `'editor'`) | field-level `access.update` on the name, logo and icon fields of Site settings: only admins change what the sign-in screens show; editors keep the rest. No schema change | `'editor'` = whoever edits Site settings |
|
||||
| `agency` | `{ name: 'Intecion.com', url: 'https://intecion.com' }` | the credit line, the panel's link description and preview image | `{ name, url }` = another agency; `false` = none anywhere |
|
||||
| `adminMeta` | on (with or without `whiteLabel`) | panel `<head>`: `robots` noindex/nofollow, `titleSuffix` "— <site> \| Panel", `og:site_name` + description from Site settings (refreshed on save), `og:image` `GET /api/ipal/admin-og` (1200×630 from the logo or name), icon `GET /api/ipal/admin-icon` (favicon or initials); no import map step | `false` = Payload defaults; `{ robots, titleSuffix, description, image, icons, language }` (each `false` or your value; `{site}`, `{agency}` placeholders); your own `admin.meta` keys always win. Check: `curl -s $URL/admin/login \| grep -E 'og:\|robots'` (white-label.md) |
|
||||
|
||||
@@ -626,7 +626,7 @@ Server only (`pnpm payload run`); never import it from client code, the Payload
|
||||
| `resolveRequireSetup(option)`, `strictExempt(fn)`, `SETUP_FROM_FIELD`, `DEFAULT_SETUP_WINDOW_HOURS` | `@intecion/ipal-kit` | `twoFactor.requireSetup` → `{ requireSetup, setupWindowMs, exempt? }` as the guard reads it (throws on a `windowHours` that is not a number ≥ 0 or `false`, and on an `async` `exempt`); the wrapper that makes an `exempt` function answer `true` only for exactly `true`; the field name `'totpSetupFrom'`; `72`. |
|
||||
| `fetchPublicImage(url, base, { timeoutMs? }?)`, `publicImageDataUri(url, base)`, `rasterImageType(bytes)`, `siteOrigin(serverURL)`, `PUBLIC_IMAGE_MAX_BYTES`, `PUBLIC_IMAGE_TIMEOUT_MS` | `@intecion/ipal-kit` | An image fetched the way an anonymous visitor gets it, as `{ bytes, type }` or a `data:` address, else `null`: no cookies; http(s) only; `image/*`; ONE address — a redirect is never followed (a 3xx is "no image"); the whole exchange within `PUBLIC_IMAGE_TIMEOUT_MS` (5000); at most `PUBLIC_IMAGE_MAX_BYTES` (512 KB), reading stops at the limit whatever `content-length` says. `base` is the site's configured origin (`siteOrigin(config.serverURL)` = `serverURL`, else `NEXT_PUBLIC_SERVER_URL`) — never build it from a request's `Host` / `X-Forwarded-Host`. Used for the logo and icon on the 2FA screens and by `/api/ipal/admin-og` and `/api/ipal/admin-icon`. `rasterImageType`: the bitmap type by the first bytes (PNG, JPEG, GIF, WebP, ICO, AVIF), `null` for anything else, SVG included. |
|
||||
| `resolveSignInLook(whiteLabel)` | `@intecion/ipal-kit` | `whiteLabel` option → `null` (white-label or `signIn` off) or `{ allScreens, props }` (`ResolvedSignInLook`; `props` = `SignInLookProps`, the plain values the components get: `accent`, `checkLogo`, `imageField`, `inlineImages`, `languages`, `logoPlate`, `nameField`, `settingsSlug`, `svgLogo`). Option type: `SignInLookOptions`. |
|
||||
| `loadSignInBrand({ payload, look, locale?, user? })`, `signInName(value, locale?)`, `signInLogo(media, { svgLogo? })`, `checkLogoFile(url, base, allowSvg?)`, `fitLogo(width, height, box?)`, `isSvgUpload(media)`, `SIGN_IN_LOGO_TYPES` | `@intecion/ipal-kit` | What the sign-in panel shows: `{ name, logo }` (`SignInBrand`, `SignInLogo = { src, width?, height? }`) read from Site settings, never throwing; the name as one line of plain text (control characters out, cut at `SIGN_IN_NAME_MAX` = 80); the logo of an upload document — only JPEG / PNG / WebP / AVIF / GIF (`SIGN_IN_LOGO_TYPES`; SVG with `svgLogo: true`), only an `http(s)` or site-relative address, fitted into `SIGN_IN_LOGO_BOX` (240 × 72) without enlarging, served from the smallest generated size ≥ 2× the shown width with the same proportions; the look at the file itself (`LogoCheck`: `{ bytes, type }`, `'bad'` = the server answered and it is no such picture or over 512 KB, `'unknown'` = nothing answered). A session that owes its 2FA code gets the checked picture inlined or no logo. |
|
||||
| `loadSignInBrand({ payload, look, locale?, user? })`, `signInName(value, locale?)`, `signInLogo(media, { svgLogo? })`, `checkLogoFile(url, base, allowSvg?)`, `fitLogo(width, height, box?)`, `isSvgUpload(media)` | `@intecion/ipal-kit` | What the sign-in panel shows: `{ name, logo }` (`SignInBrand`, `SignInLogo = { src, width?, height? }`) read from Site settings, never throwing; the name as one line of plain text (control characters out, cut at `SIGN_IN_NAME_MAX` = 80); the logo of an upload document — any picture (an SVG too unless `svgLogo: false`; `null` only for an upload whose type says it is no picture, or an address that is not `http(s)` or site-relative), fitted into `SIGN_IN_LOGO_BOX` (240 × 72) without enlarging, served from the smallest generated size ≥ 2× the shown width with the same proportions; the look at the file itself (`LogoCheck`: `{ bytes, type }`; `'bad'` = certainly no picture there: 404 / 410, a 2xx answer of another type, an SVG while refused; `'unknown'` = nothing answered, a redirect (never followed), another status, no type, over 512 KB — the upload is believed). A session that owes its 2FA code gets the checked picture inlined or no logo. |
|
||||
| `signInCss({ accent? })`, `isHexColour(value)`, `SIGN_IN_STYLE_ID` | `@intecion/ipal-kit` | The stylesheet of the sign-in look as a string (no `url()`, no font, no other host; every rule needs `.iapl-signin` on the page), the hex check `accent` must pass, and the `href` of its `<style>` (`'iapl-sign-in'`). |
|
||||
| `languageLinks(config, current)`, `LANGUAGE_NAMES`, `buildAdminLanguageEndpoint()`, `adminPathFromReferer(referer, adminRoute)`, `ADMIN_LANGUAGE_PATH` | `@intecion/ipal-kit` | The panel's languages as links (`LanguageLink[]`: `{ code, name, current, href }`; empty with one language; names in their own language, else the code); the public endpoint `GET /api/ipal/admin-language?lng=` (`'/ipal/admin-language'`) that writes `<cookiePrefix>-lng` for a supported language (else 400) and answers 303 to a path inside the admin route taken from the `Referer` (anything else → the admin root, never another host). |
|
||||
| `signInProviderActive(payload)`, `SIGN_IN_LOOK` | `@intecion/ipal-kit` | Whether the provider `'@intecion/ipal-kit/admin#SignInLook'` is in the config AND in the running import map — `AdminLogo` and `SafeTotpView` print the panel themselves only when it is not. |
|
||||
|
||||
@@ -299,8 +299,8 @@ the panel shows Site settings, Site integrations, Cookies, Form messages, the Fo
|
||||
- Sign-in screens (`whiteLabel.signIn`, on): a dark panel with the client's logo or the site's name beside the
|
||||
form; the logo and name are Site settings fields (no env var, no migration). `allScreens: true` (in the config
|
||||
above) adds the provider `SignInLook` to the import map and covers forgot / reset password, first user and
|
||||
logout. The logo: JPEG / PNG / WebP / AVIF / GIF (an SVG logo shows the name: `svgLogo: true` or upload a
|
||||
bitmap), drawn for a DARK ground (no plate; `logoPlate: true` for a logo with dark letters). `accent: '#hex'`,
|
||||
logout. The logo: any picture Site settings holds, an SVG too (`svgLogo: false` refuses SVG), drawn for a
|
||||
DARK ground (no plate; `logoPlate: true` for a logo with dark letters). `accent: '#hex'`,
|
||||
`languages: false`, `checkLogo: false`; `signIn: false` = Payload's screens. Name, logo and icon in Site
|
||||
settings are admin-only with the look (`brandAccess: 'editor'` gives them back to editors).
|
||||
Check: `/admin/login` and `/admin/forgot` show the panel, also at a phone width; do not write login CSS by hand.
|
||||
|
||||
@@ -679,8 +679,8 @@ PROGRAMISTA §6, items 73–75; email.md; AGENT.md §7.2) — nothing to run; re
|
||||
import map already has. **Check:** open `/admin/login` on a desktop and at a phone width, in both themes; sign
|
||||
in through 2FA.
|
||||
**Look at the logo:** it stands straight on a dark panel. A logo with dark letters: `signIn: { logoPlate: true }`
|
||||
(a white plate) or ask the client for a logo for dark grounds. An **SVG** logo is not shown there (the site's
|
||||
name is): upload a PNG / WebP logo, or `signIn: { svgLogo: true }`.
|
||||
(a white plate) or ask the client for a logo for dark grounds. Every logo that showed on the login screen
|
||||
before shows now (an SVG too); only a logo whose file is gone shows the site's name instead of a broken picture.
|
||||
**Editors lose three fields:** the name, logo and icon of Site settings are admin-only now (they are what the
|
||||
public sign-in page shows). A site whose editors must change them: `whiteLabel: { brandAccess: 'editor' }`.
|
||||
2. **Tell the owner the sign-in page looks different** and ask whether to keep it. No: `whiteLabel: { signIn: false }`
|
||||
|
||||
@@ -14,6 +14,7 @@ site; `after-*` from a production build with `signIn: { allScreens: true }`, `be
|
||||
| `before-*.png` | IAPL 1.17.0: login (light, dark, phone, Polish, wrong password), forgot password, 2FA code, 2FA setup; `-logo` = with a logo set |
|
||||
| `after-*-name.png` | the new look with no logo set: the site's name |
|
||||
| `after-*-logo.png` | the new look with a logo made for dark grounds (`placeholder-logo-for-dark.png`), no plate — the default |
|
||||
| `after-{login,2fa-code}-*-logo-svg.png` | an SVG logo from Site settings (`placeholder-logo-for-dark.svg`) on a built site: shown on login and, inlined, on the 2FA code screen — as 1.17.0 showed it |
|
||||
| `after-login-*-logo-dark-letters-no-plate.png` | a logo with dark letters (`placeholder-logo.png`) on the default: hard to read; such a site sets `logoPlate: true` |
|
||||
| `after-first-user-*.png` | create first user on an empty database (no site name yet: the host is shown) |
|
||||
| `legacy-unedited-*.png` | the reference site as it was at v1.16.7, **unedited**, built against this plugin: login has the look (through `AdminLogo`), forgot password and create first user are Payload's own until the project sets `allScreens` |
|
||||
@@ -50,7 +51,7 @@ without users: `--only=first-user`). The files are 8-bit PNGs (re-encoded to kee
|
||||
|---|---|---|
|
||||
| Split, panel inset and corners, grid, glows, colours | the same numbers (`css.ts`) | yes |
|
||||
| Label, logo box (240 × 72, 2× source), name as text, link to the site, alternative text | the same | yes |
|
||||
| Logo types (JPEG, PNG, WebP, AVIF, GIF; no SVG) and the look at the file before printing | the same; Payload accepts SVG uploads, so `svgLogo: true` exists; the file is checked by a fetch (IAWL reads the disk), and an unreachable address counts as "believe the upload" | yes, two notes |
|
||||
| Logo types and the look at the file before printing | **as IAPL's white label did in 1.17.0** (owner, 2026-11-26): any picture Site settings holds, an SVG too, as `<img>`; `svgLogo: false` refuses SVG. The file is asked once only to avoid a broken picture (gone / no picture → the name) | IAWL: JPEG, PNG, WebP, AVIF, GIF, no SVG (WordPress refuses the upload); file read from disk |
|
||||
| Plate | **no plate by default** (the owner's choice for new surfaces), `logoPlate: true` adds it | IAWL: plate by default, `logoMadeFor => 'dark'` removes it |
|
||||
| Button, link, focus and border colours; field and button heights; 28 rem column | the same | yes |
|
||||
| Phone band at 52 rem | the same | yes |
|
||||
|
||||
|
After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
@@ -9,10 +9,10 @@ the 2FA screens (code, setup) show a dark panel with the client's logo — or th
|
||||
look IAPL now shares with IAWL. No edit, no `generate:importmap`, no migration, no new env var.
|
||||
Keep Payload's screens: `whiteLabel: { signIn: false }`. Sites without `whiteLabel`: nothing changes.
|
||||
|
||||
Three things to look at on such a site, each with a one-line way back:
|
||||
- **The logo stands straight on a dark panel** (no plate). A logo with dark letters: `signIn: { logoPlate: true }`.
|
||||
- **An SVG logo is not shown on the sign-in screens** (the site's name is; the rest of the site is untouched):
|
||||
upload a PNG / WebP logo or set `signIn: { svgLogo: true }`.
|
||||
**Every logo that showed on the login screen before shows on the new screens** (an SVG too): the logo is handled
|
||||
as the white label handled it until now. Two things to look at on such a site, each with a one-line way back:
|
||||
- **The logo stands straight on a dark panel** (no plate — the owner's decision). A logo with dark letters:
|
||||
`signIn: { logoPlate: true }`.
|
||||
- **Editors can no longer change the site's name, logo and icon** in Site settings (admins can): these are what the
|
||||
public sign-in page shows. `whiteLabel: { brandAccess: 'editor' }` gives them back.
|
||||
|
||||
@@ -39,11 +39,13 @@ Three things to look at on such a site, each with a one-line way back:
|
||||
"unauthorized". Adds the provider `SignInLook` (one import-map entry: `pnpm payload generate:importmap`). The
|
||||
project starter writes it for new sites. A production start that does not find the entry in `importMap.js`
|
||||
leaves the provider out and logs what to run; the panel keeps working.
|
||||
- **The logo follows IAWL's rules:** JPEG, PNG, WebP, AVIF or GIF; fetched and checked by its bytes before it is
|
||||
printed (at most 512 KB; a deleted or broken file gives the name); fits 240 × 72, served from a generated size
|
||||
at least twice as wide when the media collection has one; alternative text = the site's name.
|
||||
- **The logo:** whatever Site settings → Logo holds, an SVG too, as an `<img>`; fits 240 × 72 (it was up to
|
||||
420 × 120), served from a generated size at least twice as wide when the media collection has one; alternative
|
||||
text = the site's name. Its file is asked once before it is printed (no redirect followed, 4 s, 512 KB): a file
|
||||
that is gone, or is no picture, gives the site's name instead of a broken picture; in any doubt the upload is
|
||||
believed.
|
||||
- **Options:** `signIn.accent` (hex colour of the button, links and focus ring), `signIn.logoPlate` (a white plate),
|
||||
`signIn.svgLogo` (allow an SVG logo), `signIn.checkLogo: false`, `signIn.languages: false`,
|
||||
`signIn.svgLogo: false` (refuse an SVG logo), `signIn.checkLogo: false`, `signIn.languages: false`,
|
||||
`whiteLabel.brandAccess` (`'admin'` with the look, `'editor'` as before; field-level access, no schema change).
|
||||
CSS variables `--iapl-signin-*` for a project's `custom.scss`.
|
||||
- **Language links before sign-in:** `GET /api/ipal/admin-language?lng=<code>` writes Payload's language cookie for
|
||||
@@ -52,7 +54,7 @@ Three things to look at on such a site, each with a one-line way back:
|
||||
- **The 2FA code boxes have names** for screen readers ("Digit 2 of 6") and ask a phone for the numeric keyboard
|
||||
(with the sign-in look).
|
||||
- Exports: `SignInPanel`, `SignInLook` (`/admin`); `resolveSignInLook`, `loadSignInBrand`, `signInLogo`,
|
||||
`signInName`, `checkLogoFile`, `fitLogo`, `isSvgUpload`, `SIGN_IN_LOGO_TYPES`, `languageLinks`, `LANGUAGE_NAMES`, `signInCss`, `isHexColour`,
|
||||
`signInName`, `checkLogoFile`, `fitLogo`, `isSvgUpload`, `languageLinks`, `LANGUAGE_NAMES`, `signInCss`, `isHexColour`,
|
||||
`signInProviderActive`, `buildAdminLanguageEndpoint`, `adminPathFromReferer`, `SIGN_IN_LOOK`, `SIGN_IN_STYLE_ID`,
|
||||
`SIGN_IN_LOGO_BOX`, `SIGN_IN_NAME_MAX`, `ADMIN_LANGUAGE_PATH` and their types.
|
||||
|
||||
@@ -66,5 +68,5 @@ Three things to look at on such a site, each with a one-line way back:
|
||||
|
||||
## Requires project changes
|
||||
|
||||
None for the panel to work — but read the three points at the top. Recommended: `allScreens` (one config line, regenerate the import map). A project with its own CSS for the
|
||||
None for the panel to work — but read the two points at the top. Recommended: `allScreens` (one config line, regenerate the import map). A project with its own CSS for the
|
||||
login screen looks at the result after the update.
|
||||
|
||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="560" height="160" viewBox="0 0 560 160"><path d="M20 80a60 60 0 0 1 60-60h40v120H80a60 60 0 0 1-60-60z" fill="#b8c0cc"/><text x="150" y="78" font-family="Helvetica,Arial,sans-serif" font-weight="700" font-size="52" fill="#ffffff">Your logo</text><text x="150" y="124" font-family="Helvetica,Arial,sans-serif" font-size="34" fill="#b8c0cc">SVG placeholder</text></svg>
|
||||
|
After Width: | Height: | Size: 415 B |
@@ -135,15 +135,18 @@ uses too.** No new field, collection or global — so **no migration on Postgres
|
||||
With nothing set, the panel shows the label and the site's host: no Intecion and no Payload mark is put on a
|
||||
client's sign-in page (the credit line under the form is separate: `credit: false`).
|
||||
|
||||
**The logo — the same rules as on the WordPress sibling (IAWL):**
|
||||
**The logo — handled as the white label handled it on the login screen until now.** The rule: *a logo that showed
|
||||
on a site's login screen before the sign-in look shows on the new screens too.*
|
||||
|
||||
- **Types:** JPEG, PNG, WebP, AVIF, GIF. **No SVG** (`svgLogo: true` allows it; IAWL has no such switch because
|
||||
WordPress refuses the upload — Payload accepts SVG uploads, so a site whose logo is an SVG shows its **name** on
|
||||
the sign-in screens until it uploads a bitmap or sets the option).
|
||||
- **Looked at before it is printed:** the server fetches the file as an anonymous visitor would (at most 512 KB)
|
||||
and reads its first bytes. A deleted, broken, renamed, non-image or too large file gives the site's name, never
|
||||
a broken picture. A redirect is never followed by the server. The answer is remembered for ten minutes. When nothing answers at all (a container that cannot
|
||||
reach its own public address), the upload document is believed. `checkLogo: false` turns the look off.
|
||||
- **Types: whatever Site settings → Logo holds**, an SVG included, shown as a picture (`<img>`, where no picture
|
||||
runs script) — exactly what `AdminLogo` printed in 1.17.0. No list of allowed types. `svgLogo: false` refuses
|
||||
SVG for a project that wants bitmaps only. *IAWL differs:* it has no SVG because WordPress refuses the upload.
|
||||
- **Looked at before it is printed — only to avoid a broken picture.** The server asks the file's address once, as
|
||||
an anonymous visitor would. The site's name is shown instead when the file is **gone** (404 / 410) or the answer
|
||||
**is no picture** (an HTML page, a PDF) — the cases where 1.17.0 showed a broken picture. In every other case
|
||||
the upload is believed and the browser decides: nothing answers (a container that cannot reach its own public
|
||||
address), a redirect (never followed by the server), any other status (a firewall that refuses servers), a file
|
||||
over 512 KB. The answer is remembered for ten minutes. `checkLogo: false` turns the look off.
|
||||
- **Size:** fits 240 × 72 px (192 × 56 on a phone), never enlarged or cropped, `width` and `height` set (no
|
||||
layout shift). Served from the smallest generated size (`imageSizes` of the media collection) that is at least
|
||||
twice the shown width and has the same proportions; else the upload itself. Recommended: PNG or WebP, 480 px
|
||||
@@ -183,7 +186,7 @@ screens … Run "pnpm payload generate:importmap"`. Without `allScreens` the oth
|
||||
| `accent` | the shared blue `#0070c0` | a hex colour for the button, the links and the focus ring; it carries white text, so check its contrast (4.5:1) |
|
||||
| `logoPlate` | `false` | `true`: a white plate behind the logo (a logo with dark letters) |
|
||||
| `languages` | shown when the panel has 2+ languages | `false`: no language links, and no `/api/ipal/admin-language` endpoint |
|
||||
| `svgLogo` | `false` | `true`: an SVG logo is shown too (as a picture, where it cannot run script) |
|
||||
| `svgLogo` | `true` | `false`: an SVG logo is not shown on the sign-in screens; the site's name is |
|
||||
| `checkLogo` | `true` | `false`: the logo's file is not fetched and looked at before it is printed |
|
||||
|
||||
**Language links.** Plain links, no script: `GET /api/ipal/admin-language?lng=pl` writes Payload's own language
|
||||
@@ -198,11 +201,12 @@ The sign-in page is open to anyone, so what reaches it is narrow on purpose:
|
||||
|
||||
- **Text:** the site's name only, as plain text (escaped; one line, at most 80 characters). No description, no
|
||||
rich text, no link an editor can write: the panel's only links are the site's own root and the language links.
|
||||
- **Pictures:** the logo as an `<img>`, bitmaps only (above), checked by its bytes, at most 512 KB; only an
|
||||
`http(s)` or site-relative address is used. The plugin serves **no new file** for it: the logo is the media file
|
||||
- **Pictures:** the logo as an `<img>` — a picture in `<img>` never runs script, an SVG included, and it is never
|
||||
put into the page as markup; only an `http(s)` or site-relative address is used. The server's own look at the
|
||||
file asks one address, follows no redirect, waits 4 s and reads at most 512 KB. The plugin serves **no new file** for it: the logo is the media file
|
||||
at its own address, with the media collection's own headers and cache rules. On the 2FA screens (the session is
|
||||
refused `media`) the picture that was just checked is put into the page as a `data:` image; when it could not
|
||||
be fetched the name is shown (`inlineImages`, above).
|
||||
refused `media`) the picture that was just checked is put into the page as a `data:` image (at most 512 KB);
|
||||
when it could not be fetched — also when its address redirects — the name is shown (`inlineImages`, above).
|
||||
- **Who can change it: admins.** With the sign-in look on, the three brand fields of Site settings (name, logo,
|
||||
icon) get field-level access for admins only; an editor still edits every other Site setting and sees these
|
||||
three read-only. No schema change. `whiteLabel: { brandAccess: 'editor' }` gives them back to editors.
|
||||
@@ -242,7 +246,7 @@ Set the custom properties on `:root` in the admin's `custom.scss` (the defaults
|
||||
- **Your own panel:** `SignInPanel` (the panel with its stylesheet) and `SignInLook` (the provider) are exported
|
||||
from `@intecion/ipal-kit/admin`; wire them in `admin.components` with `serverProps: { look: { … } }`
|
||||
(`SignInLookProps`). From the main entry: `resolveSignInLook`, `loadSignInBrand`, `signInLogo`, `signInName`,
|
||||
`checkLogoFile` (`LogoCheck`), `SIGN_IN_LOGO_TYPES`, `fitLogo`, `isSvgUpload`, `languageLinks`, `LANGUAGE_NAMES`, `signInCss`, `isHexColour`, `signInProviderActive`,
|
||||
`checkLogoFile` (`LogoCheck`), `fitLogo`, `isSvgUpload`, `languageLinks`, `LANGUAGE_NAMES`, `signInCss`, `isHexColour`, `signInProviderActive`,
|
||||
`buildAdminLanguageEndpoint`, `adminPathFromReferer`, and the constants `SIGN_IN_LOOK`, `SIGN_IN_STYLE_ID`,
|
||||
`SIGN_IN_LOGO_BOX`, `SIGN_IN_NAME_MAX`, `ADMIN_LANGUAGE_PATH`; types `SignInLookOptions`, `ResolvedSignInLook`,
|
||||
`SignInLookProps`, `SignInBrand`, `SignInLogo`, `LanguageLink`, `SignInPanelProps`, `SignInLookProviderProps`.
|
||||
|
||||