feat: add visual admin panel with page builder and settings editor
- Add /admin route with password-protected visual page builder
- Page Builder: manage hero images, standalone albums, subpages, and sections
- Album Picker: browse all shared Immich albums with search and filtering
- Settings Editor: theme, grid, footer, legal, SEO configuration
- YAML service with atomic writes and automatic backups (content/.backups/)
- HMAC-signed admin sessions (24h expiry, HttpOnly cookies)
- API endpoints: /api/admin/{auth,gallery,settings,albums,reload}
- Enable with ADMIN_PASSWORD env var; disabled by default
- invalidateConfigCache() export for hot-reload after saves
2026-05-29 17:04:37 +02:00
|
|
|
import type { Metadata } from 'next';
|
|
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
|
title: 'Immich Folio Admin',
|
|
|
|
|
robots: { index: false, follow: false },
|
|
|
|
|
};
|
|
|
|
|
|
2026-07-20 18:57:57 +02:00
|
|
|
/**
|
|
|
|
|
* Required for the CSP nonce. The admin page is a pure client component, so
|
|
|
|
|
* Next.js would statically prerender it at build time — and a prerendered HTML
|
|
|
|
|
* file cannot carry the per-request nonce that middleware.ts issues. Since the
|
|
|
|
|
* CSP uses 'strict-dynamic' (which makes 'self' inert), unnonced script tags
|
|
|
|
|
* are blocked and the panel never hydrates. Rendering per request lets Next.js
|
|
|
|
|
* stamp the nonce onto the script tags it emits.
|
|
|
|
|
*/
|
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
|
|
feat: add visual admin panel with page builder and settings editor
- Add /admin route with password-protected visual page builder
- Page Builder: manage hero images, standalone albums, subpages, and sections
- Album Picker: browse all shared Immich albums with search and filtering
- Settings Editor: theme, grid, footer, legal, SEO configuration
- YAML service with atomic writes and automatic backups (content/.backups/)
- HMAC-signed admin sessions (24h expiry, HttpOnly cookies)
- API endpoints: /api/admin/{auth,gallery,settings,albums,reload}
- Enable with ADMIN_PASSWORD env var; disabled by default
- invalidateConfigCache() export for hot-reload after saves
2026-05-29 17:04:37 +02:00
|
|
|
export default function AdminLayout({ children }: { children: React.ReactNode }) {
|
|
|
|
|
return <div className="admin-layout">{children}</div>;
|
|
|
|
|
}
|