chore: standardize security and quality foundations
This commit is contained in:
@@ -1,37 +1,100 @@
|
||||
type ConfigLink = { href: string; label: string; description: string; symbol?: string; service?: string }
|
||||
type ConfigGroup = { title: string; description: string; advanced?: boolean; items: ConfigLink[] }
|
||||
type ConfigLink = { href: string; label: string; description: string; symbol?: string; service?: string };
|
||||
type ConfigGroup = { title: string; description: string; advanced?: boolean; items: ConfigLink[] };
|
||||
|
||||
export const CONFIG_GROUPS: ConfigGroup[] = [
|
||||
{ title: 'Media services', description: 'Connect the services that collect, repair and play your content.', items: [
|
||||
{ href: '/admin/seerr', label: 'Seerr', description: 'Requests and approvals', symbol: 'SE', service: 'Seerr' },
|
||||
{ href: '/admin/jellyfin', label: 'Jellyfin', description: 'Playback and library availability', symbol: 'JF', service: 'Jellyfin' },
|
||||
{ href: '/admin/jellystat', label: 'Jellystat', description: 'Personal viewing statistics', symbol: 'JS', service: 'Jellystat' },
|
||||
{ href: '/admin/sonarr', label: 'Sonarr', description: 'TV collection and quality', symbol: 'SO', service: 'Sonarr' },
|
||||
{ href: '/admin/radarr', label: 'Radarr', description: 'Movie collection and quality', symbol: 'RA', service: 'Radarr' },
|
||||
{ href: '/admin/bazarr', label: 'Bazarr', description: 'Subtitle repairs', symbol: 'BA', service: 'Bazarr' },
|
||||
{ href: '/admin/prowlarr', label: 'Prowlarr', description: 'Search sources', symbol: 'PR', service: 'Prowlarr' },
|
||||
{ href: '/admin/qbittorrent', label: 'qBittorrent', description: 'Download progress and recovery', symbol: 'QB', service: 'qBittorrent' },
|
||||
]},
|
||||
{ title: 'Preferences & access', description: 'Set the experience for your users and how issues are followed up.', items: [
|
||||
{ href: '/admin/site', label: 'Site & sign-in', description: 'Announcements and login options' },
|
||||
{ href: '/admin/notifications', label: 'Email & notifications', description: 'Invites, password resets and repair updates' },
|
||||
{ href: '/admin/recaps', label: 'Monthly email recaps', description: 'Personal viewing emails, schedule and delivery history' },
|
||||
{ href: '/admin/newsletters', label: 'Newsletters', description: 'New arrivals, featured picks and weekly editions' },
|
||||
{ href: '/admin/issue-workflow', label: 'Issue follow-up', description: 'Confirmation emails and automatic closure' },
|
||||
{ href: '/admin/requests', label: 'Request updates', description: 'Refresh schedule and history retention' },
|
||||
{ href: '/users', label: 'User management', description: 'Accounts, permissions, identity checks and repairs' },
|
||||
{ href: '/admin/invites', label: 'Invite policy & access', description: 'Defaults, profiles and issued invites' },
|
||||
]},
|
||||
{ title: 'Advanced tools', description: 'Hosting and troubleshooting.', advanced: true, items: [
|
||||
{ href: '/admin/general', label: 'Hosting & proxy', description: 'Public addresses and deployment options' },
|
||||
{ href: '/admin/diagnostics', label: 'System health', description: 'Service checks and diagnostics' },
|
||||
{ href: '/admin/logs', label: 'Logs', description: 'Recent activity and log settings' },
|
||||
{ href: '/admin/cache', label: 'Request cache', description: 'Inspect saved request records' },
|
||||
{ href: '/admin/artwork', label: 'Artwork cache', description: 'Poster storage and missing artwork' },
|
||||
{ href: '/admin/maintenance', label: 'Recovery & cleanup', description: 'Database repair and history cleanup' },
|
||||
]},
|
||||
]
|
||||
{
|
||||
title: "Media services",
|
||||
description: "Connect the services that collect, repair and play your content.",
|
||||
items: [
|
||||
{ href: "/admin/seerr", label: "Seerr", description: "Requests and approvals", symbol: "SE", service: "Seerr" },
|
||||
{
|
||||
href: "/admin/jellyfin",
|
||||
label: "Jellyfin",
|
||||
description: "Playback and library availability",
|
||||
symbol: "JF",
|
||||
service: "Jellyfin",
|
||||
},
|
||||
{
|
||||
href: "/admin/jellystat",
|
||||
label: "Jellystat",
|
||||
description: "Personal viewing statistics",
|
||||
symbol: "JS",
|
||||
service: "Jellystat",
|
||||
},
|
||||
{
|
||||
href: "/admin/sonarr",
|
||||
label: "Sonarr",
|
||||
description: "TV collection and quality",
|
||||
symbol: "SO",
|
||||
service: "Sonarr",
|
||||
},
|
||||
{
|
||||
href: "/admin/radarr",
|
||||
label: "Radarr",
|
||||
description: "Movie collection and quality",
|
||||
symbol: "RA",
|
||||
service: "Radarr",
|
||||
},
|
||||
{ href: "/admin/bazarr", label: "Bazarr", description: "Subtitle repairs", symbol: "BA", service: "Bazarr" },
|
||||
{ href: "/admin/prowlarr", label: "Prowlarr", description: "Search sources", symbol: "PR", service: "Prowlarr" },
|
||||
{
|
||||
href: "/admin/qbittorrent",
|
||||
label: "qBittorrent",
|
||||
description: "Download progress and recovery",
|
||||
symbol: "QB",
|
||||
service: "qBittorrent",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Preferences & access",
|
||||
description: "Set the experience for your users and how issues are followed up.",
|
||||
items: [
|
||||
{ href: "/admin/site", label: "Site & sign-in", description: "Announcements and login options" },
|
||||
{
|
||||
href: "/admin/notifications",
|
||||
label: "Email & notifications",
|
||||
description: "Invites, password resets and repair updates",
|
||||
},
|
||||
{
|
||||
href: "/admin/recaps",
|
||||
label: "Monthly email recaps",
|
||||
description: "Personal viewing emails, schedule and delivery history",
|
||||
},
|
||||
{
|
||||
href: "/admin/newsletters",
|
||||
label: "Newsletters",
|
||||
description: "New arrivals, featured picks and weekly editions",
|
||||
},
|
||||
{
|
||||
href: "/admin/issue-workflow",
|
||||
label: "Issue follow-up",
|
||||
description: "Confirmation emails and automatic closure",
|
||||
},
|
||||
{ href: "/admin/requests", label: "Request updates", description: "Refresh schedule and history retention" },
|
||||
{ href: "/users", label: "User management", description: "Accounts, permissions, identity checks and repairs" },
|
||||
{ href: "/admin/invites", label: "Invite policy & access", description: "Defaults, profiles and issued invites" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Advanced tools",
|
||||
description: "Hosting and troubleshooting.",
|
||||
advanced: true,
|
||||
items: [
|
||||
{ href: "/admin/general", label: "Hosting & proxy", description: "Public addresses and deployment options" },
|
||||
{ href: "/admin/diagnostics", label: "System health", description: "Service checks and diagnostics" },
|
||||
{ href: "/admin/logs", label: "Logs", description: "Recent activity and log settings" },
|
||||
{ href: "/admin/cache", label: "Request cache", description: "Inspect saved request records" },
|
||||
{ href: "/admin/artwork", label: "Artwork cache", description: "Poster storage and missing artwork" },
|
||||
{ href: "/admin/maintenance", label: "Recovery & cleanup", description: "Database repair and history cleanup" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export const serviceStatusLabel = (status?: string) => ({
|
||||
up: 'Connected', down: 'Unavailable', degraded: 'Needs attention', not_configured: 'Not set up',
|
||||
}[status ?? ''] ?? 'Not checked')
|
||||
export const serviceStatusLabel = (status?: string) =>
|
||||
({
|
||||
up: "Connected",
|
||||
down: "Unavailable",
|
||||
degraded: "Needs attention",
|
||||
not_configured: "Not set up",
|
||||
})[status ?? ""] ?? "Not checked";
|
||||
|
||||
Reference in New Issue
Block a user