60 lines
2.9 KiB
TypeScript
60 lines
2.9 KiB
TypeScript
import type { Payload } from 'payload';
|
|
/**
|
|
* White-label admin branding: the Payload admin panel's logo (login + nav) and
|
|
* icon, pulled from the project's SiteSettings so each client sees THEIR brand,
|
|
* set by the editor in the panel — not hardcoded per project. Wired
|
|
* automatically by `ipalKit({ whiteLabel: true })` (it injects
|
|
* admin.components.graphics.Logo/Icon pointing here).
|
|
*
|
|
* Server Components — they read the SiteSettings global at render, using the
|
|
* `payload` instance Payload itself passes to admin server components. NO
|
|
* `import('@payload-config')`: a variable-specifier import isn't traced by the
|
|
* Next bundler ("Cannot find module '@payload-config'") — same bug class as the
|
|
* old 2FA import. Everything is wrapped in try/catch: no payload prop, DB not
|
|
* ready, etc. → site name text, then null (Payload's own default) — never
|
|
* throws, never blocks the panel.
|
|
*
|
|
* A0: no client brand in code. The logo/name come from the panel; if nothing is
|
|
* set, nothing is forced.
|
|
*/
|
|
type BrandingProps = {
|
|
/** Upload field to render as the image. Default 'logo' (Logo) / 'favicon' (Icon). */
|
|
imageField?: string;
|
|
/** Injected by Payload — current admin locale (object or code). */
|
|
locale?: {
|
|
code?: string;
|
|
} | string;
|
|
/** Field holding the site name. Default 'siteName'. */
|
|
nameField?: string;
|
|
/** Injected by Payload into admin server components. */
|
|
payload?: Payload;
|
|
/** SiteSettings global slug. Default 'site-settings'. */
|
|
settingsSlug?: string;
|
|
};
|
|
/**
|
|
* Admin panel logo — this is the LARGE logo on the login / unauthorized screens
|
|
* (Payload uses `graphics.Icon` for the small nav glyph). SiteSettings `logo`,
|
|
* falls back to `siteName` text. Sized generously for the login screen.
|
|
*/
|
|
export declare function AdminLogo(props?: BrandingProps): Promise<import("react/jsx-runtime").JSX.Element | null>;
|
|
/** Admin panel icon (small nav glyph). SiteSettings `favicon`, falls back to initials. */
|
|
export declare function AdminIcon(props?: BrandingProps): Promise<import("react/jsx-runtime").JSX.Element | null>;
|
|
/**
|
|
* Discreet vendor credit: "Technology supported by 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.
|
|
* Text/URL overridable; turn it off with `whiteLabel: { credit: false }`.
|
|
*
|
|
* Wired by ipalKit into admin.components.afterNavLinks (nav) AND afterLogin
|
|
* (login screen footer). `variant` adjusts placement:
|
|
* - 'nav' → left-aligned line under the nav links
|
|
* - 'login' → centered line below the login form
|
|
*/
|
|
export declare function IntecionCredit(props?: {
|
|
text?: string;
|
|
url?: string;
|
|
variant?: 'login' | 'nav';
|
|
}): import("react/jsx-runtime").JSX.Element;
|
|
export {};
|