Sign-in look: the logo is handled as the white label handled it in 1.17.0 (owner, 2026-11-26)
A logo that showed on a site's login screen shows on the new screens: any picture Site settings holds, an SVG included, as <img>; svgLogo: false refuses SVG (off by default); the list of allowed types is gone. The look at the file only avoids a broken picture: a file that is gone (404 / 410) or is no picture gives the name; anything else (no answer, a redirect, another status, over 512 KB) believes the upload. Redirects are still never followed by the server, and the body is read with the 512 KB cap. A test checks twelve kinds of logo that 1.17.0 shows. No plate stays the default. Docs, skills, changelog draft. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
aef1efac73
commit
24ccc5dc8b
+18
-14
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user