Files
kb-anhonesthost/tools/screenshots/shots.config.ts

34 lines
1.2 KiB
TypeScript
Raw Normal View History

export type Shot = {
/** Stable filename id; output is src/assets/screenshots/whp/<id>.png */
id: string;
/** Path on the WHP host. Leading slash, no scheme/host. */
path: string;
/** Optional CSS selector to clip to a region instead of the full viewport */
selector?: string;
/** Optional list of selectors to redact (account ID, IPs, etc.) before snapshot */
mask?: string[];
/** Defaults: 1440x900 */
viewport?: { width: number; height: number };
/** Optional selector to wait for before capturing */
waitFor?: string;
};
/** Always-applied redactions. Per-shot mask is added on top of this list. */
export const DEFAULT_MASK: string[] = [
'[data-test="account-id"]',
'[data-test="server-hostname"]',
'[data-test="user-ip"]',
'.billing-column',
];
export const shots: Shot[] = [
{ id: 'whp-domains-add', path: '/domains/add' },
{ id: 'whp-sites-add', path: '/sites/add' },
{ id: 'whp-email-add', path: '/email/add' },
{ id: 'whp-backups-settings', path: '/backups/settings' },
{ id: 'whp-backups-history', path: '/backups/history' },
{ id: 'whp-monitor', path: '/security/monitor' },
{ id: 'whp-email-archive', path: '/email/archive' },
{ id: 'whp-resources', path: '/overview/resources' },
];