diff --git a/package.json b/package.json
index e2d139c..744c8bc 100644
--- a/package.json
+++ b/package.json
@@ -18,9 +18,13 @@
"dependencies": {
"@better-auth/drizzle-adapter": "^1.6.26",
"@js-temporal/polyfill": "^0.5.1",
+ "@radix-ui/react-slot": "^1.3.3",
"better-auth": "^1.6.26",
+ "clsx": "^2.1.1",
"drizzle-orm": "^0.45.2",
+ "lucide-react": "^1.31.0",
"next": "^16.3.0",
+ "next-themes": "^0.4.6",
"nodemailer": "^9.0.5",
"pdfmake": "~0.3.11",
"pg": "^8.22.0",
@@ -28,6 +32,7 @@
"react-dom": "^19.2.8",
"server-only": "^0.0.1",
"sharp": "^0.35.3",
+ "tailwind-merge": "^3.6.0",
"zod": "^4.4.3"
},
"devDependencies": {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 164b27f..ce256c2 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -14,15 +14,27 @@ importers:
'@js-temporal/polyfill':
specifier: ^0.5.1
version: 0.5.1
+ '@radix-ui/react-slot':
+ specifier: ^1.3.3
+ version: 1.3.3(@types/react@19.2.18)(react@19.2.8)
better-auth:
specifier: ^1.6.26
version: 1.6.26(drizzle-kit@0.31.10)(drizzle-orm@0.45.2(@types/pg@8.21.0)(kysely@0.29.4)(pg@8.22.0))(next@16.3.0(@babel/core@7.29.7)(@playwright/test@1.62.1)(@types/node@24.13.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8))(pg@8.22.0)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)(vitest@4.1.10(@types/node@24.13.3)(jsdom@30.0.1(@noble/hashes@2.3.0))(msw@2.15.0(@types/node@24.13.3)(typescript@5.9.3))(vite@8.2.1(@types/node@24.13.3)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.11)(yaml@2.9.0)))
+ clsx:
+ specifier: ^2.1.1
+ version: 2.1.1
drizzle-orm:
specifier: ^0.45.2
version: 0.45.2(@types/pg@8.21.0)(kysely@0.29.4)(pg@8.22.0)
+ lucide-react:
+ specifier: ^1.31.0
+ version: 1.31.0(react@19.2.8)
next:
specifier: ^16.3.0
version: 16.3.0(@babel/core@7.29.7)(@playwright/test@1.62.1)(@types/node@24.13.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
+ next-themes:
+ specifier: ^0.4.6
+ version: 0.4.6(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
nodemailer:
specifier: ^9.0.5
version: 9.0.5
@@ -44,6 +56,9 @@ importers:
sharp:
specifier: ^0.35.3
version: 0.35.3(@types/node@24.13.3)
+ tailwind-merge:
+ specifier: ^3.6.0
+ version: 3.6.0
zod:
specifier: ^4.4.3
version: 4.4.3
@@ -1343,6 +1358,24 @@ packages:
'@protobufjs/utf8@1.1.2':
resolution: {integrity: sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==}
+ '@radix-ui/react-compose-refs@1.1.5':
+ resolution: {integrity: sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
+ '@radix-ui/react-slot@1.3.3':
+ resolution: {integrity: sha512-qx7oqnYbxnK9kYI9m317qmFmEgo6ywqWvbTogdj7cL9p3/yx4M48p7Rnw5z3H890cL/ow/EeWJsuTykeZVXP5Q==}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@rolldown/binding-android-arm64@1.2.3':
resolution: {integrity: sha512-zrJtHDcaZJ1Fp7xf4hNl+7seH9Cn/N5TwLYkhgXREtBwAd/jaqW3uqeHxpDugJLVICWg4eW44kOQEGJ1r6jCGw==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -2207,6 +2240,10 @@ packages:
resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==}
engines: {node: '>=0.8'}
+ clsx@2.1.1:
+ resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==}
+ engines: {node: '>=6'}
+
color-convert@2.0.1:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
@@ -3290,6 +3327,11 @@ packages:
lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
+ lucide-react@1.31.0:
+ resolution: {integrity: sha512-G8u2eEtoHUnUa9f8lbvqDhCiORMnYLdUEo06EEG9MQvHQrInKcX3Pa2TH39MM5qyzRcWETxB0+aOwAPI1g1kEg==}
+ peerDependencies:
+ react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
+
lz-string@1.5.0:
resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
hasBin: true
@@ -3383,6 +3425,12 @@ packages:
natural-compare@1.4.0:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
+ next-themes@0.4.6:
+ resolution: {integrity: sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==}
+ peerDependencies:
+ react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
+
next@16.3.0:
resolution: {integrity: sha512-NEdGOzH+08eTXMUp9UYkA99Nhi5N6Thrhc1jgFOQgfgnGK/dA2hRwBpXep+exdFQrnwlRf/3Wixyp8lLBUpE2A==}
engines: {node: '>=20.9.0'}
@@ -3972,6 +4020,9 @@ packages:
resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==}
engines: {node: '>=20'}
+ tailwind-merge@3.6.0:
+ resolution: {integrity: sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w==}
+
tailwindcss@4.3.3:
resolution: {integrity: sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==}
@@ -5223,6 +5274,19 @@ snapshots:
'@protobufjs/utf8@1.1.2': {}
+ '@radix-ui/react-compose-refs@1.1.5(@types/react@19.2.18)(react@19.2.8)':
+ dependencies:
+ react: 19.2.8
+ optionalDependencies:
+ '@types/react': 19.2.18
+
+ '@radix-ui/react-slot@1.3.3(@types/react@19.2.18)(react@19.2.8)':
+ dependencies:
+ '@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
+ react: 19.2.8
+ optionalDependencies:
+ '@types/react': 19.2.18
+
'@rolldown/binding-android-arm64@1.2.3':
optional: true
@@ -6016,6 +6080,8 @@ snapshots:
clone@2.1.2: {}
+ clsx@2.1.1: {}
+
color-convert@2.0.1:
dependencies:
color-name: 1.1.4
@@ -7199,6 +7265,10 @@ snapshots:
dependencies:
yallist: 3.1.1
+ lucide-react@1.31.0(react@19.2.8):
+ dependencies:
+ react: 19.2.8
+
lz-string@1.5.0: {}
magic-string@0.30.21:
@@ -7282,6 +7352,11 @@ snapshots:
natural-compare@1.4.0: {}
+ next-themes@0.4.6(react-dom@19.2.8(react@19.2.8))(react@19.2.8):
+ dependencies:
+ react: 19.2.8
+ react-dom: 19.2.8(react@19.2.8)
+
next@16.3.0(@babel/core@7.29.7)(@playwright/test@1.62.1)(@types/node@24.13.3)(react-dom@19.2.8(react@19.2.8))(react@19.2.8):
dependencies:
'@next/env': 16.3.0
@@ -7979,6 +8054,8 @@ snapshots:
tagged-tag@1.0.0: {}
+ tailwind-merge@3.6.0: {}
+
tailwindcss@4.3.3: {}
tapable@2.3.3: {}
diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx
index 14a2ab6..45a10c8 100644
--- a/src/app/admin/page.tsx
+++ b/src/app/admin/page.tsx
@@ -4,6 +4,8 @@ import { usages, editorialAccounts } from "@/db/schema";
import { requireAdmin } from "@/modules/auth/principal";
import { headers } from "next/headers";
import Link from "next/link";
+import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
+import { Button } from "@/components/ui/button";
export default async function AdminDashboardPage() {
await requireAdmin(new Headers(await headers()));
@@ -48,87 +50,107 @@ export default async function AdminDashboardPage() {
const formatter = new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" });
return (
- Willkommen zurück! Hier ist ein Überblick über die aktuelle Nutzung des Portals. Willkommen zurück! Hier ist ein Überblick über die aktuelle Nutzung des Portals.
- {formatter.format((revenueStats?.totalCents ?? 0) / 100)}
-
- {revenueStats?.count ?? 0} lizenzierte Bilder im {now.toLocaleString("de-DE", { month: "long" })}
-
+ {revenueStats?.count ?? 0} lizenzierte Bilder im {now.toLocaleString("de-DE", { month: "long" })}
+ Noch keine Daten vorhanden. Noch keine Daten vorhanden. Noch keine Daten vorhanden. Noch keine Daten vorhanden. Redaktion · Albumrechte
- Die Immich-Alben sind momentan nicht erreichbar. Bereits bestehende Zuweisungen bleiben
- unverändert.
-
- Zurück zur Redaktion
- Admin Dashboard
- Admin Dashboard
+ Umsatz diesen Monat
- Aktivste Redaktionen
-
-
-
+
-
-
-
- {topEditorials.map(ed => (
- Redaktion
- Downloads
- Umsatz
-
-
-
- {ed.name}
-
-
- {ed.downloadCount}
- {formatter.format(ed.revenueCents / 100)}
+
+
+
+
+
+ {topEditorials.map((ed, i) => (
+
+
- ))}
-
- Redaktion
+ Downloads
+ Umsatz
+
+ ))}
+
+
+
+ {ed.name}
+
+
+ {ed.downloadCount}
+ {formatter.format(ed.revenueCents / 100)}
+ Beliebteste Alben
-
-
-
+
-
-
-
- {topAlbums.map(album => (
- Album
- Downloads
-
- {album.albumName}
- {album.downloadCount}
+
+
+
+
+
+ {topAlbums.map((album, i) => (
+
+
- ))}
-
- Album
+ Downloads
+
+ ))}
+
+ {album.albumName}
+ {album.downloadCount}
+ Alben für {editorial.name}
-
Redaktion · Albumrechte
+Redaktion · Albumrechte
-+
Redaktion · Albumrechte
+Nur Alben, die der technische Immich-Zugang lesen kann, lassen sich zuweisen.
-- Zurück zur Redaktion - {" · "} - Auto-Zuweisungsregeln verwalten -
+Derzeit sind keine zuweisbaren Alben vorhanden.
- ) : ( -Derzeit sind keine zuweisbaren Alben vorhanden.
+ ) : ( +Finanzen
-Finanzen
+- {new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(openTotalCents / 100)} -
-- Für {openUsages?.count ?? 0} kostenpflichtige Bilder (noch nicht in Rechnung gestellt) -
-+ {new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(openTotalCents / 100)} +
++ Für {openUsages?.count ?? 0} kostenpflichtige Bilder (noch nicht in Rechnung gestellt) +
+- {new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(editorial.flatratePriceCents / 100)} / Monat -
- {editorial.flatrateAssetLimit === null ? ( -
- Unbegrenzte Downloads inklusive
+
+ {new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(editorial.flatratePriceCents / 100)}
+ / Monat
- Inklusiv-Bilder diesen Monat: {usedFlatrateImages} / {editorial.flatrateAssetLimit}
+ {editorial.flatrateAssetLimit === null ? (
+
+ Unbegrenzte Downloads inklusive
Es liegen noch keine abgerechneten Zeiträume vor.
+Es liegen noch keine abgerechneten Zeiträume vor.
+| Rechnungsnummer | -Zeitraum | -Betrag (Netto) | -Download | -||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| {report.invoiceNumber} | -- {new Intl.DateTimeFormat("de-DE", { month: "long", year: "numeric" }).format(report.periodStartsAt)} - | -- {new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(report.netTotalCents / 100)} - | -- - - PDF anzeigen - - | +
| Rechnungsnummer | +Zeitraum | +Betrag (Netto) | +Download |
|---|
Bildarchiv · Suche
-Bildarchiv · Suche
+Bildarchiv · Freigaben
-Wählen Sie ein Spiel oder eine Serie, um die freigegebenen Fotos zu durchsuchen.
+Bildarchiv · Freigaben
+Wählen Sie ein Spiel oder eine Serie, um die freigegebenen Fotos zu durchsuchen.
Für Ihre Redaktion sind noch keine Fotoalben freigegeben.
+Für Ihre Redaktion sind noch keine Fotoalben freigegeben.
) : (