Admin link previews: site name, description, preview image, noindex; technology support credit

- adminMeta (default on, with or without whiteLabel): robots noindex/nofollow,
  title suffix "— <site> | Panel", og:site_name and en/pl description from
  Site settings, preview image GET /api/ipal/admin-og (next/og, from the logo
  or name, no external service) and icon GET /api/ipal/admin-icon
- the site name sits in a process-wide store read through getters, so link
  previews stay current after a Site settings save and across config loads
- agency option (default Intecion.com) feeds the credit, description and image;
  credit reads "Technology support: Intecion.com" (pl: Wsparcie technologiczne)
- the project's own admin.meta keys always win; adminMeta: false / agency: false
- dev: whiteLabel on; docs: white-label.md, AGENT.md, ipal-reference/setup/upgrade

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-29 11:31:42 +01:00
co-authored by Claude Opus 5.5
parent 6998b44431
commit 3c828d963d
16 changed files with 647 additions and 38 deletions
+13 -4
View File
@@ -116,7 +116,7 @@ export async function AdminIcon(props: BrandingProps = {}) {
}
/**
* Discreet vendor credit: "Technology supported by Intecion.com". This is the
* Discreet vendor credit: "Technology support: Intecion.com". This is the
* PLUGIN VENDOR's credit (Intecion ships ipal-kit, the framework), not client
* data — a sensible default here is fine and A0-safe. The client's own brand
* still owns the logo/name; this is a small line stating who supports the tech.
@@ -130,11 +130,20 @@ export async function AdminIcon(props: BrandingProps = {}) {
* - 'login' → centered line below the login form
*/
export function IntecionCredit(
props: { i18n?: { t: (key: never, vars?: Record<string, unknown>) => string }; text?: string; url?: string; variant?: 'login' | 'nav' } = {},
props: {
/** Agency name in the default text (`agency` option). Default "Intecion.com". */
agency?: string
i18n?: { t: (key: never, vars?: Record<string, unknown>) => string }
text?: string
url?: string
variant?: 'login' | 'nav'
} = {},
) {
const { i18n, url = 'https://intecion.com', variant = 'nav' } = props
const { agency = 'Intecion.com', i18n, url = 'https://intecion.com', variant = 'nav' } = props
// A project's own text wins; otherwise the plugin's text in the admin language.
const text = props.text ?? (i18n ? ipalT(i18n.t, 'brandingCredit') : settingsTexts.en.brandingCredit)
const text =
props.text ??
(i18n ? ipalT(i18n.t, 'brandingCredit', { agency }) : settingsTexts.en.brandingCredit.replace('{{agency}}', agency))
const style =
variant === 'login'
? {