Docs in English (part 1), seeding guide, Coolify deployment
- 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]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6e3979bae6
commit
2d9f3e15d4
+67
-67
@@ -1,12 +1,12 @@
|
||||
# white-label — branding panelu admina z panelu
|
||||
# white-label — admin panel branding from the admin panel
|
||||
|
||||
Panel admina pokazuje **markę klienta** (logo + nazwa) na ekranie logowania i w
|
||||
nawigacji, pobraną z **SiteSettings** — czyli ustawioną przez redaktora w panelu,
|
||||
nie zahardkodowaną w kodzie. Każdy klient loguje się do „swojego" panelu.
|
||||
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.
|
||||
|
||||
Powiązane: [security.md](./security.md) (adminRoute), [accessibility.md](./accessibility.md).
|
||||
Related: [security.md](./security.md) (adminRoute), [accessibility.md](./accessibility.md).
|
||||
|
||||
## Włączenie
|
||||
## Turning it on
|
||||
|
||||
```ts
|
||||
// payload.config.ts
|
||||
@@ -16,97 +16,97 @@ ipalKit({
|
||||
})
|
||||
```
|
||||
|
||||
`true` wpina branding z domyślnych pól SiteSettings: `logo` (logo panelu),
|
||||
`favicon` (mała ikona nawigacji), `siteName` (nazwa / fallback tekstowy).
|
||||
`true` wires branding from the default SiteSettings fields: `logo` (panel logo),
|
||||
`favicon` (small navigation icon), `siteName` (name / text fallback).
|
||||
|
||||
> **Po włączeniu uruchom `pnpm generate:importmap`.** Plugin wstrzykuje
|
||||
> `admin.components.graphics.Logo/Icon` wskazujące na `@intecion/ipal-kit/admin`;
|
||||
> Payload musi zregenerować import map, żeby je znaleźć. Bez tego kroku panel
|
||||
> użyje domyślnego logo Payload.
|
||||
> **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.
|
||||
|
||||
## Konfiguracja (opcjonalnie)
|
||||
## Configuration (optional)
|
||||
|
||||
```ts
|
||||
whiteLabel: {
|
||||
settingsSlug: 'site-settings', // globalny slug ustawień
|
||||
nameField: 'siteName', // pole z nazwą
|
||||
logoField: 'logo', // upload na duże logo (ekran logowania)
|
||||
iconField: 'favicon', // upload na ikonę nav
|
||||
titleSuffix: ' · Acme Admin', // sufiks tytułu w karcie przeglądarki (statyczny)
|
||||
credit: true, // kredyt dostawcy pod nawigacją (domyślnie on)
|
||||
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)
|
||||
}
|
||||
```
|
||||
|
||||
| Opcja | Domyślnie | Opis |
|
||||
| Option | Default | Description |
|
||||
|---|---|---|
|
||||
| `settingsSlug` | `'site-settings'` | slug globala ustawień |
|
||||
| `nameField` | `'siteName'` | tekstowy fallback (lokalizowany → bieżący locale, potem pierwszy dostępny) |
|
||||
| `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` | brak | `admin.meta.titleSuffix` |
|
||||
| `credit` | `true` | `false` lub `{ text?, url? }` |
|
||||
| `titleSuffix` | none | `admin.meta.titleSuffix` |
|
||||
| `credit` | `true` | `false` or `{ text?, url? }` |
|
||||
|
||||
Plugin nadpisuje `admin.components.graphics.Logo` / `Icon` z configu projektu (jego
|
||||
wartości wygrywają nad Twoimi); `afterLogin` / `afterNavLinks` są dopisywane.
|
||||
The plugin overrides `admin.components.graphics.Logo` / `Icon` from the project config (its
|
||||
values win over yours); `afterLogin` / `afterNavLinks` are appended.
|
||||
|
||||
## Kredyt dostawcy — „Technology supported by Intecion.com"
|
||||
## Vendor credit — "Technology supported by Intecion.com"
|
||||
|
||||
Dyskretny kredyt **„Technology supported by Intecion.com"** (link do
|
||||
`https://intecion.com`) pojawia się w **dwóch miejscach**:
|
||||
- **pod nawigacją** panelu (`afterNavLinks`, wariant `nav` — wyrównany do lewej),
|
||||
- **na dole ekranu logowania** (`afterLogin`, wariant `login` — wyśrodkowany).
|
||||
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).
|
||||
|
||||
To kredyt DOSTAWCY technologii (Intecion dostarcza framework ipal-kit) — marka
|
||||
klienta nadal rządzi logiem i nazwą; to tylko linijka „kto wspiera technologię".
|
||||
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.
|
||||
|
||||
Domyślnie włączony z `whiteLabel`. Sterowanie:
|
||||
On by default with `whiteLabel`. Control:
|
||||
|
||||
```ts
|
||||
whiteLabel: { credit: false } // ukryj (oba miejsca)
|
||||
whiteLabel: { credit: { text: 'Powered by Intecion', url: 'https://intecion.com' } } // własny tekst/url
|
||||
whiteLabel: { credit: false } // hide (both places)
|
||||
whiteLabel: { credit: { text: 'Powered by Intecion', url: 'https://intecion.com' } } // custom text/url
|
||||
```
|
||||
|
||||
## Logo na ekranie logowania
|
||||
## Logo on the login screen
|
||||
|
||||
`AdminLogo` to DUŻE logo na ekranie logowania (Payload używa `graphics.Icon` do
|
||||
małej ikony w nawigacji). Renderuje się sporo większe (`maxHeight 120 / maxWidth
|
||||
420`), żeby marka klienta była wyraźna przy logowaniu. Mała ikona nav to `favicon`
|
||||
przez `AdminIcon`.
|
||||
`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`.
|
||||
|
||||
## Jak to działa
|
||||
## How it works
|
||||
|
||||
- `AdminLogo` / `AdminIcon` to **Server Components** czytające SiteSettings przy
|
||||
renderze przez instancję `payload`, którą Payload sam przekazuje komponentom
|
||||
admina (bez importu `@payload-config`), z `depth: 1` i bieżącym locale panelu.
|
||||
- **Bezpieczne fallbacki:** gdy baza jest niedostępna (ekran logowania zanim
|
||||
wstanie DB, build bez bazy) albo logo nie jest ustawione → komponent pokazuje
|
||||
nazwę (`siteName`), a gdy i jej brak → `null` (domyślne Payload). Nigdy nie
|
||||
rzuca, nie blokuje panelu.
|
||||
- **A0:** żadnej marki klienta w kodzie. Logo i nazwa pochodzą z panelu; jak nic
|
||||
nie ustawiono, nic nie jest narzucane.
|
||||
- `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.
|
||||
|
||||
## Granice
|
||||
## Limits
|
||||
|
||||
- **`titleSuffix` jest statyczny** — tytuł karty przeglądarki ustawia się w
|
||||
configu (build-time), więc nie czyta się z bazy. Logo i ikona (to, co widać) są
|
||||
dynamiczne z SiteSettings; sufiks tytułu podajesz w opcji, jeśli chcesz.
|
||||
- **To branding panelu, nie front** — wygląd strony publicznej robisz jak dotąd
|
||||
(bloki, style projektu). White-label dotyczy wyłącznie panelu admina.
|
||||
- Ścieżkę panelu (`/admin → /its`) ustawiasz osobno przez `adminRoute` — patrz
|
||||
- **`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 })`
|
||||
- [ ] Redaktor wgrał `logo` i `favicon` w SiteSettings (+ `siteName`)
|
||||
- [ ] The editor uploaded `logo` and `favicon` in SiteSettings (+ `siteName`)
|
||||
- [ ] `pnpm generate:importmap`
|
||||
- [ ] Restart dev / rebuild → panel pokazuje markę klienta na loginie i w nav
|
||||
- [ ] Restart dev / rebuild → the panel shows the client's brand on login and in the nav
|
||||
|
||||
## Wyłączenie, nadpisanie, rozszerzenie
|
||||
## Turn off, override, extend
|
||||
|
||||
- **Wyłączenie:** bez `whiteLabel` (domyślnie) panel ma branding Payload; `credit: false` ukrywa kredyt.
|
||||
- **Nadpisanie:** inne pola / global (`settingsSlug`, `nameField`, `logoField`, `iconField`), tekst i URL
|
||||
kredytu, `titleSuffix`. Przy włączonym `whiteLabel` plugin nadpisuje `graphics.Logo` / `Icon` z configu
|
||||
projektu — własne komponenty graficzne ustaw bez `whiteLabel`.
|
||||
- **Rozszerzenie:** `AdminLogo`, `AdminIcon`, `IntecionCredit` z `@intecion/ipal-kit/admin` można wpiąć
|
||||
ręcznie w `admin.components` z własnymi `serverProps`.
|
||||
- **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`.
|
||||
|
||||
Reference in New Issue
Block a user