Docs: admin languages and texts, wording rule for agents, new screen names
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6b46bc0c14
commit
0a2374db18
+15
-9
@@ -1,4 +1,4 @@
|
||||
# integrations — the Site Integrations global and integration status in the admin panel
|
||||
# integrations — the Site integrations global and integration status in the admin panel
|
||||
|
||||
External service keys edited in the admin panel, plus a notice for the editor when one of them
|
||||
stops working — no crons, no polling: the server records the status when it actually uses an integration.
|
||||
@@ -6,7 +6,7 @@ stops working — no crons, no polling: the server records the status when it ac
|
||||
Related: [email.md](./email.md) (SMTP/Graph), [turnstile.md](./turnstile.md),
|
||||
[analytics.md](./analytics.md), [seo.md](./seo.md) (IndexNow), [deployment.md](./deployment.md).
|
||||
|
||||
## The `site-integrations` global (panel: Settings → Site Integrations)
|
||||
## The `site-integrations` global (panel: Settings → Site integrations)
|
||||
|
||||
Currently always added by the plugin. Tabs (unnamed — flat data, e.g. `ga4MeasurementId`):
|
||||
|
||||
@@ -36,7 +36,7 @@ The "Send test" button (SMTP) calls `POST /api/ipal/test-email` (endpoint curren
|
||||
- **Changing keys in the admin panel** (Turnstile, `emailTransport` / `smtp*`) clears that integration's old status.
|
||||
- **`IntegrationAlerts`** (`@intecion/ipal-kit/admin`) — the plugin always wires it into
|
||||
`admin.components.beforeDashboard`: a list of integrations in the `degraded` state + Turnstile key
|
||||
problems + an "Open Site Integrations" link (from `adminRoute`). When everything works it renders nothing.
|
||||
problems + an "Open Site integrations" link (from `adminRoute`). When everything works it renders nothing.
|
||||
- **`IntegrationStatusBanner`** (`/admin`) — a banner on the tab: red on error (message,
|
||||
code, since when), a green line after a fix, nothing before first use.
|
||||
|
||||
@@ -49,7 +49,9 @@ import { buildIntegrationStatusBanner, buildIntegrationStatusField, recordIntegr
|
||||
|
||||
ipalKit({
|
||||
integrationsFields: [
|
||||
buildIntegrationStatusBanner('crmStatus', 'CRM'), // UI field `crmStatusBanner`
|
||||
// UI field `crmStatusBanner`; label as a string or { en, pl }; optional third argument
|
||||
// { failing, hint } = keys of your own texts in i18n.translations.<lang>.ipal
|
||||
buildIntegrationStatusBanner('crmStatus', { en: 'CRM', pl: 'CRM' }),
|
||||
{ name: 'crmApiKey', type: 'text' },
|
||||
buildIntegrationStatusField('crmStatus'), // hidden group: state, code, message, since, checkedAt
|
||||
],
|
||||
@@ -62,10 +64,14 @@ await recordIntegrationStatus(payload, 'crmStatus', previous, { state: 'ok' })
|
||||
|
||||
After adding the banner: `pnpm payload generate:importmap`; Postgres: `migrate:create`.
|
||||
|
||||
Types: `IntegrationState` (`'ok' | 'degraded'`), `IntegrationStatus`. The dashboard
|
||||
`IntegrationAlerts` checks only `emailStatus` and `turnstileStatus` by default (prop `checks`) —
|
||||
to show your own integration, wire a second `IntegrationAlerts` with `checks: { crmStatus: 'CRM' }`
|
||||
into `beforeDashboard`.
|
||||
Types: `IntegrationState` (`'ok' | 'degraded'`), `IntegrationStatus`, `IntegrationLabel`
|
||||
(`string | { en, pl }`), `IntegrationBannerTexts` (`{ failing, hint }` — text keys). Without
|
||||
texts the banner says "{label} is not working."; the plugin's own banners use
|
||||
`statusEmailFailing` / `statusEmailHint` and `statusTurnstileFailing` / `statusTurnstileHint`
|
||||
(override per language in `i18n.translations.<lang>.ipal`, see i18n.md "Admin panel languages and texts").
|
||||
The dashboard `IntegrationAlerts` checks only `emailStatus` and `turnstileStatus` by default
|
||||
(prop `checks`, labels as strings or `{ en, pl }`) — to show your own integration, wire a second
|
||||
`IntegrationAlerts` with `checks: { crmStatus: 'CRM' }` into `beforeDashboard`.
|
||||
|
||||
## Turn off / override
|
||||
|
||||
@@ -73,5 +79,5 @@ into `beforeDashboard`.
|
||||
are **currently always added** — there is no option to turn them off. Workaround: a project plugin
|
||||
wired after `ipalKit()` that removes / replaces the entry in `config.globals`, `config.endpoints` or
|
||||
`admin.components.beforeDashboard`.
|
||||
- Extension: `integrationsFields` (Custom tab). The plugin's tabs, access and labels cannot
|
||||
- Extension: `integrationsFields` (the *More* tab). The plugin's tabs, access and labels cannot
|
||||
currently be overridden with an option.
|
||||
|
||||
Reference in New Issue
Block a user