- Translate to English every doc the code branches did not touch: AGENT.md, developer guide, vibe, CHANGELOG, docs index, module pages, all skills except ipal-seo-check (14 pages follow after the security/SEO merge). Placeholder marker is now [TO FILL: …]; skill resources renamed to section-code.md / nav-code.md. AGENT.md and the ipal-skills pointer block say the docs are in English. - docs/seeding.md: create-only, natural keys, never delete, no users or secrets, empty-field globals, fallbackLocale: false, dry run, backup and restore, production update guard, seeds vs migrations, Coolify Terminal. Seed templates gain --dry-run, the SEED_UPDATE production guard (IPAL_SEED_ALLOW_PROD_UPDATE), skip of edited records and a summary. "Seeding on production" rule block in AGENT.md. - Coolify is the single deployment path (deployment, env, developer guide, ipal-setup): build vs runtime env, migrations on container start (prodMigrations), health check and rolling updates, rollback, backups and restore, DNS/Let's Encrypt/CAA. R2: custom domain needs a Cloudflare zone; default is media served by the app (R2_PUBLIC_URL empty). - docsConsistency: no Polish prose outside code/quoted data (pending pages listed); IPAL_* names may also be read by shipped skill templates. Co-Authored-By: Claude Opus 5.5 <[email protected]>
113 lines
5.1 KiB
Markdown
113 lines
5.1 KiB
Markdown
# white-label — admin panel branding from the admin panel
|
||
|
||
The admin panel shows the **client's brand** (logo + name) on the login screen and in
|
||
the navigation, taken from **SiteSettings** — i.e. set by the editor in the admin panel,
|
||
not hard-coded. Each client logs in to "their own" panel.
|
||
|
||
Related: [security.md](./security.md) (adminRoute), [accessibility.md](./accessibility.md).
|
||
|
||
## Turning it on
|
||
|
||
```ts
|
||
// payload.config.ts
|
||
ipalKit({
|
||
i18n: { /* … */ },
|
||
whiteLabel: true,
|
||
})
|
||
```
|
||
|
||
`true` wires branding from the default SiteSettings fields: `logo` (panel logo),
|
||
`favicon` (small navigation icon), `siteName` (name / text fallback).
|
||
|
||
> **After turning it on, run `pnpm generate:importmap`.** The plugin injects
|
||
> `admin.components.graphics.Logo/Icon` pointing at `@intecion/ipal-kit/admin`;
|
||
> Payload must regenerate the import map to find them. Without this step the panel
|
||
> uses the default Payload logo.
|
||
|
||
## Configuration (optional)
|
||
|
||
```ts
|
||
whiteLabel: {
|
||
settingsSlug: 'site-settings', // global settings slug
|
||
nameField: 'siteName', // name field
|
||
logoField: 'logo', // upload for the large logo (login screen)
|
||
iconField: 'favicon', // upload for the nav icon
|
||
titleSuffix: ' · Acme Admin', // browser tab title suffix (static)
|
||
credit: true, // vendor credit under the navigation (default on)
|
||
}
|
||
```
|
||
|
||
| Option | Default | Description |
|
||
|---|---|---|
|
||
| `settingsSlug` | `'site-settings'` | slug of the settings global |
|
||
| `nameField` | `'siteName'` | text fallback (localized → current locale, then the first available) |
|
||
| `logoField` | `'logo'` | `graphics.Logo` → `AdminLogo` |
|
||
| `iconField` | `'favicon'` | `graphics.Icon` → `AdminIcon` (max 28×28 px) |
|
||
| `titleSuffix` | none | `admin.meta.titleSuffix` |
|
||
| `credit` | `true` | `false` or `{ text?, url? }` |
|
||
|
||
The plugin overrides `admin.components.graphics.Logo` / `Icon` from the project config (its
|
||
values win over yours); `afterLogin` / `afterNavLinks` are appended.
|
||
|
||
## Vendor credit — "Technology supported by Intecion.com"
|
||
|
||
A discreet credit **"Technology supported by Intecion.com"** (a link to
|
||
`https://intecion.com`) appears in **two places**:
|
||
- **under the panel navigation** (`afterNavLinks`, variant `nav` — left-aligned),
|
||
- **at the bottom of the login screen** (`afterLogin`, variant `login` — centered).
|
||
|
||
It is a credit for the technology VENDOR (Intecion provides the ipal-kit framework) — the client's
|
||
brand still owns the logo and name; this is just a "who supports the technology" line.
|
||
|
||
On by default with `whiteLabel`. Control:
|
||
|
||
```ts
|
||
whiteLabel: { credit: false } // hide (both places)
|
||
whiteLabel: { credit: { text: 'Powered by Intecion', url: 'https://intecion.com' } } // custom text/url
|
||
```
|
||
|
||
## Logo on the login screen
|
||
|
||
`AdminLogo` is the LARGE logo on the login screen (Payload uses `graphics.Icon` for
|
||
the small icon in the navigation). It renders quite a bit larger (`maxHeight 120 / maxWidth
|
||
420`), so the client's brand is clear at login. The small nav icon is `favicon`
|
||
through `AdminIcon`.
|
||
|
||
## How it works
|
||
|
||
- `AdminLogo` / `AdminIcon` are **Server Components** that read SiteSettings at
|
||
render time through the `payload` instance Payload itself passes to admin
|
||
components (no `@payload-config` import), with `depth: 1` and the panel's current locale.
|
||
- **Safe fallbacks:** when the database is unavailable (login screen before the
|
||
DB is up, a build without a database) or no logo is set → the component shows the
|
||
name (`siteName`), and when that is missing too → `null` (Payload defaults). It never
|
||
throws, never blocks the panel.
|
||
- **A0:** no client brand in code. Logo and name come from the admin panel; if nothing
|
||
is set, nothing is imposed.
|
||
|
||
## Limits
|
||
|
||
- **`titleSuffix` is static** — the browser tab title is set in the
|
||
config (build time), so it is not read from the database. The logo and icon (what you see) are
|
||
dynamic from SiteSettings; give the title suffix in the option if you want one.
|
||
- **This is panel branding, not the front end** — you build the public site's look as before
|
||
(blocks, project styles). White-label applies only to the admin panel.
|
||
- Set the panel path (`/admin → /its`) separately with `adminRoute` — see
|
||
[security.md](./security.md).
|
||
|
||
## Checklist
|
||
|
||
- [ ] `ipalKit({ whiteLabel: true })`
|
||
- [ ] The editor uploaded `logo` and `favicon` in SiteSettings (+ `siteName`)
|
||
- [ ] `pnpm generate:importmap`
|
||
- [ ] Restart dev / rebuild → the panel shows the client's brand on login and in the nav
|
||
|
||
## Turn off, override, extend
|
||
|
||
- **Turn off:** without `whiteLabel` (default) the panel has Payload branding; `credit: false` hides the credit.
|
||
- **Override:** other fields / global (`settingsSlug`, `nameField`, `logoField`, `iconField`), credit text and URL,
|
||
`titleSuffix`. With `whiteLabel` on, the plugin overrides `graphics.Logo` / `Icon` from the project
|
||
config — set your own graphics components without `whiteLabel`.
|
||
- **Extend:** `AdminLogo`, `AdminIcon`, `IntecionCredit` from `@intecion/ipal-kit/admin` can be wired
|
||
manually into `admin.components` with your own `serverProps`.
|