feat: standardizer changes
This commit is contained in:
1 parent
8728308fc6
commit
70ebcc9cd5
13 files changed
+147
-119
No files matched your search
@@ -4,6 +4,7 @@ import { usages, editorialAccounts } from "@/db/schema";
|
||||
import { requireAdmin } from "@/modules/auth/principal";
|
||||
import { headers } from "next/headers";
|
||||
import Link from "next/link";
|
||||
import { PageHeader } from "@/components/ui/page-header";
|
||||
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
@@ -51,10 +52,10 @@ export default async function AdminDashboardPage() {
|
||||
|
||||
return (
|
||||
<div className="space-y-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
|
||||
<div>
|
||||
<h1 className="text-4xl font-bold tracking-tight">Admin Dashboard</h1>
|
||||
<p className="text-muted-foreground mt-2">Willkommen zurück! Hier ist ein Überblick über die aktuelle Nutzung des Portals.</p>
|
||||
</div>
|
||||
<PageHeader
|
||||
title="Admin Dashboard"
|
||||
description="Willkommen zurück! Hier ist ein Überblick über die aktuelle Nutzung des Portals."
|
||||
/>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
<Card>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { desc } from "drizzle-orm";
|
||||
|
||||
import { PageHeader } from "@/components/ui/page-header";
|
||||
|
||||
import { db } from "@/db/client";
|
||||
import { editorialAccounts } from "@/db/schema";
|
||||
|
||||
@@ -23,8 +25,11 @@ export default async function EditorialsPage() {
|
||||
|
||||
return (
|
||||
<section className="content-section" aria-labelledby="editorials-title">
|
||||
<p className="eyebrow">Kontoverwaltung</p>
|
||||
<h1 id="editorials-title">Redaktionen</h1>
|
||||
<PageHeader
|
||||
kicker="Kontoverwaltung"
|
||||
title="Redaktionen"
|
||||
titleId="editorials-title"
|
||||
/>
|
||||
{activeEditorials.length === 0 ? (
|
||||
<p>Noch keine aktiven Redaktionen registriert.</p>
|
||||
) : (
|
||||
|
||||
@@ -7,6 +7,7 @@ import { loadEditorialDownloadOptions } from "@/modules/downloads/stream";
|
||||
import { lightboxService } from "@/modules/lightbox/service";
|
||||
|
||||
import { requireEditorial } from "../../access";
|
||||
import { PageHeader } from "@/components/ui/page-header";
|
||||
|
||||
type AlbumPageProps = Readonly<{
|
||||
params: Promise<{ albumId: string }>;
|
||||
@@ -41,13 +42,15 @@ export default async function AlbumPage({ params, searchParams }: AlbumPageProps
|
||||
|
||||
return (
|
||||
<section className="editorial-section" aria-labelledby="album-title">
|
||||
<p className="editorial-kicker">Bildarchiv · {result.album.assetCount} freigegebene Fotos</p>
|
||||
<div className="editorial-title-row album-title-row">
|
||||
<h1 id="album-title">{result.album.albumName}</h1>
|
||||
<PageHeader
|
||||
kicker={`Bildarchiv · ${result.album.assetCount} freigegebene Fotos`}
|
||||
title={result.album.albumName}
|
||||
titleId="album-title"
|
||||
>
|
||||
<Link className="quiet-link" href="/redaktion/alben">
|
||||
Alle Alben
|
||||
</Link>
|
||||
</div>
|
||||
</PageHeader>
|
||||
<AlbumSearchForm albumId={result.album.id} query={query} format={format} jahr={jahr} />
|
||||
<PhotoContactSheet
|
||||
albumId={result.album.id}
|
||||
@@ -175,12 +178,18 @@ function normalizedQuery(value: string | undefined): string {
|
||||
function ImmichUnavailable() {
|
||||
return (
|
||||
<section className="editorial-section editorial-state" aria-labelledby="album-title">
|
||||
<p className="editorial-kicker">Bildarchiv</p>
|
||||
<h1 id="album-title">Fotos momentan nicht erreichbar</h1>
|
||||
<p role="status">Bitte laden Sie diese Seite in wenigen Minuten erneut.</p>
|
||||
<Link className="quiet-link" href="/redaktion/alben">
|
||||
Zurück zu den Alben
|
||||
</Link>
|
||||
<PageHeader
|
||||
kicker="Bildarchiv"
|
||||
title="Fotos momentan nicht erreichbar"
|
||||
titleId="album-title"
|
||||
>
|
||||
<div className="flex flex-col gap-2 items-end">
|
||||
<p role="status">Bitte laden Sie diese Seite in wenigen Minuten erneut.</p>
|
||||
<Link className="quiet-link" href="/redaktion/alben">
|
||||
Zurück zu den Alben
|
||||
</Link>
|
||||
</div>
|
||||
</PageHeader>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import { loadEditorialDownloadOptions } from "@/modules/downloads/stream";
|
||||
import { lightboxService } from "@/modules/lightbox/service";
|
||||
import type { ImmichSearchPage } from "@/modules/immich/types";
|
||||
import Link from "next/link";
|
||||
import { PageHeader } from "@/components/ui/page-header";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
@@ -56,10 +57,11 @@ export default async function AlbumsPage({ searchParams }: { searchParams: Promi
|
||||
|
||||
return (
|
||||
<div className="space-y-6 max-w-7xl animate-in fade-in slide-in-from-bottom-4 duration-500" aria-labelledby="albums-title">
|
||||
<div>
|
||||
<p className="text-sm font-semibold uppercase tracking-widest text-primary-600 dark:text-primary-500 mb-2">Bildarchiv · Suche</p>
|
||||
<h1 id="albums-title" className="text-4xl font-bold tracking-tight">Suchergebnisse</h1>
|
||||
</div>
|
||||
<PageHeader
|
||||
kicker="Bildarchiv · Suche"
|
||||
title="Suchergebnisse"
|
||||
titleId="albums-title"
|
||||
/>
|
||||
<GlobalSearchForm query={query} format={format} jahr={jahr} />
|
||||
<PhotoContactSheet
|
||||
albumName="Alle Alben"
|
||||
@@ -82,11 +84,12 @@ export default async function AlbumsPage({ searchParams }: { searchParams: Promi
|
||||
|
||||
return (
|
||||
<div className="space-y-8 max-w-7xl animate-in fade-in slide-in-from-bottom-4 duration-500" aria-labelledby="albums-title">
|
||||
<div>
|
||||
<p className="text-sm font-semibold uppercase tracking-widest text-primary-600 dark:text-primary-500 mb-2">Bildarchiv · Freigaben</p>
|
||||
<h1 id="albums-title" className="text-4xl font-bold tracking-tight">Ihre Alben</h1>
|
||||
<p className="text-muted-foreground mt-2">Wählen Sie ein Spiel oder eine Serie, um die freigegebenen Fotos zu durchsuchen.</p>
|
||||
</div>
|
||||
<PageHeader
|
||||
kicker="Bildarchiv · Freigaben"
|
||||
title="Ihre Alben"
|
||||
titleId="albums-title"
|
||||
description="Wählen Sie ein Spiel oder eine Serie, um die freigegebenen Fotos zu durchsuchen."
|
||||
/>
|
||||
<GlobalSearchForm query={query} format={format} jahr={jahr} />
|
||||
{result.albums.length === 0 ? (
|
||||
<p className="text-muted-foreground text-center py-12">Für Ihre Redaktion sind noch keine Fotoalben freigegeben.</p>
|
||||
@@ -169,10 +172,11 @@ async function loadAlbums(editorialId: string) {
|
||||
function ImmichUnavailable() {
|
||||
return (
|
||||
<div className="space-y-6 max-w-7xl animate-in fade-in slide-in-from-bottom-4 duration-500" aria-labelledby="albums-title">
|
||||
<div>
|
||||
<p className="text-sm font-semibold uppercase tracking-widest text-primary-600 dark:text-primary-500 mb-2">Bildarchiv</p>
|
||||
<h1 id="albums-title" className="text-4xl font-bold tracking-tight">Alben momentan nicht erreichbar</h1>
|
||||
</div>
|
||||
<PageHeader
|
||||
kicker="Bildarchiv"
|
||||
title="Alben momentan nicht erreichbar"
|
||||
titleId="albums-title"
|
||||
/>
|
||||
<div className="bg-destructive/15 text-destructive p-4 rounded-md border border-destructive/30" role="status">
|
||||
Bitte laden Sie diese Seite in wenigen Minuten erneut. Ihre Freigaben bleiben unverändert.
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { headers } from "next/headers";
|
||||
import { PageHeader } from "@/components/ui/page-header";
|
||||
import { requireActiveEditorial } from "@/modules/auth/principal";
|
||||
import { lightboxService } from "@/modules/lightbox/service";
|
||||
import { immichClient } from "@/modules/immich/client";
|
||||
@@ -21,10 +22,10 @@ export default async function LightboxPage() {
|
||||
|
||||
return (
|
||||
<div className="space-y-8 max-w-7xl animate-in fade-in slide-in-from-bottom-4 duration-500">
|
||||
<div>
|
||||
<p className="text-sm font-semibold uppercase tracking-widest text-primary-600 dark:text-primary-500 mb-2">Merkzettel</p>
|
||||
<h1 className="text-4xl font-bold tracking-tight">Dein Leuchtkasten</h1>
|
||||
</div>
|
||||
<PageHeader
|
||||
kicker="Merkzettel"
|
||||
title="Dein Leuchtkasten"
|
||||
/>
|
||||
|
||||
{items.length === 0 ? (
|
||||
<p className="text-muted-foreground text-center py-12">Dein Leuchtkasten ist leer.</p>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import Link from "next/link";
|
||||
|
||||
import { PageHeader } from "@/components/ui/page-header";
|
||||
|
||||
import { formatBerlinDateTime } from "@/modules/downloads/format";
|
||||
import type { UsageHistoryAttempt, UsageHistoryPage } from "@/modules/downloads/stream";
|
||||
|
||||
@@ -17,11 +19,12 @@ const byteFormatter = new Intl.NumberFormat("de-DE", {
|
||||
export function UsageHistoryContent({ history }: Readonly<{ history: UsageHistoryPage }>) {
|
||||
return (
|
||||
<section className="editorial-section usage-history" aria-labelledby="usage-history-title">
|
||||
<p className="editorial-kicker">Abrechnung · Downloadprotokoll</p>
|
||||
<div className="editorial-title-row">
|
||||
<h1 id="usage-history-title">Ihre Nutzungen</h1>
|
||||
<p>Verwendungszwecke, Kosten und Auslieferungsversuche Ihrer Redaktion.</p>
|
||||
</div>
|
||||
<PageHeader
|
||||
kicker="Abrechnung · Downloadprotokoll"
|
||||
title="Ihre Nutzungen"
|
||||
titleId="usage-history-title"
|
||||
description="Verwendungszwecke, Kosten und Auslieferungsversuche Ihrer Redaktion."
|
||||
/>
|
||||
|
||||
{history.items.length === 0 ? (
|
||||
<div className="usage-history-empty">
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eq } from "drizzle-orm";
|
||||
|
||||
import { PageHeader } from "@/components/ui/page-header";
|
||||
|
||||
import { db } from "@/db/client";
|
||||
import { billingAddressVersions, editorialAccounts } from "@/db/schema";
|
||||
|
||||
@@ -28,8 +30,11 @@ export default async function EditorialProfilePage() {
|
||||
|
||||
return (
|
||||
<section className="editorial-section" aria-labelledby="profile-title">
|
||||
<p className="eyebrow">Redaktionskonto</p>
|
||||
<h1 id="profile-title">Profil</h1>
|
||||
<PageHeader
|
||||
kicker="Redaktionskonto"
|
||||
title="Profil"
|
||||
titleId="profile-title"
|
||||
/>
|
||||
<dl>
|
||||
<dt>Redaktion</dt>
|
||||
<dd>{editorial?.name}</dd>
|
||||
|
||||
Reference in new issue
Block a user