Files
webmail/components/admin/admin-page-icons.ts
T
Linus Rath 16273e447f feat: put user features and settings with the organisation pages under Users and let features apply to one domain or group
The admin skeleton test and the outgoing-hosts path test now expect the
sidebar heading "Users" and the page "Features and settings": the
Organisation group was renamed and User policy moved into it.
2026-11-04 08:22:41 +01:00

69 lines
1.6 KiB
TypeScript

/**
* The admin sidebar's icons and group headings. A plain module (no
* "use client"), so the admin shell and its page skeleton, which the server
* renders, draw the same list.
*/
import {
Activity,
ArrowUpCircle,
Bell,
Building2,
CalendarDays,
HeartRateMonitor,
LayoutDashboard,
LayoutTemplate,
Palette,
PenLine,
Puzzle,
Scale,
ScrollText,
Server,
Share2,
Shield,
ShieldCheck,
Smartphone,
Store,
SwatchBook,
Tag,
SpellCheck,
type AppIcon,
} from '@/components/icons';
import type { AdminPageDef, AdminPageId } from '@/lib/admin/admin-nav';
export const ADMIN_PAGE_ICONS: Record<AdminPageId, AppIcon> = {
dashboard: LayoutDashboard,
settings: Server,
auth: Shield,
branding: Palette,
policy: Scale,
organisation: Building2,
'org-signatures': PenLine,
'org-templates': LayoutTemplate,
'org-security': ShieldCheck,
'org-sharing': Share2,
'org-labels': Tag,
'org-proofreading': SpellCheck,
'org-calendars': CalendarDays,
'org-notices': Bell,
'org-devices': Smartphone,
plugins: Puzzle,
themes: SwatchBook,
marketplace: Store,
version: ArrowUpCircle,
telemetry: Activity,
monitoring: HeartRateMonitor,
logs: ScrollText,
};
/** In sidebar order; `top` has no heading. */
export const ADMIN_GROUPS = ['top', 'organisation', 'extensions', 'system'] as const;
export const ADMIN_GROUP_LABELS: Record<AdminPageDef['group'], string | null> = {
top: null,
// Everything about what users get: features, settings, and the
// organisation pages, each with the same "Applies to" picker.
organisation: 'Users',
extensions: 'Extensions',
system: 'System',
};