feat: complete UI design system refactoring and fix TS build errors

This commit is contained in:
Leon Tonhäuser committed 2026-08-11 03:38:34 +02:00
1 parent 0b1ffdfdfc
commit 8728308fc6
27 files changed
+847 -370

No files matched your search

+28 -25
View File
@@ -13,47 +13,50 @@ export default async function LightboxPage() {
// Fetch asset details for all items in the lightbox
const assets = items.length > 0
? await immichClient.searchAssets({
assetIds: items.map(i => i.assetId)
})
? await Promise.all(items.map(i => immichClient.getAsset(i.assetId).catch(() => null)))
: [];
const assetMap = new Map(assets.map(a => [a.id, a]));
const validAssets = assets.filter((a): a is NonNullable<typeof a> => a !== null);
const assetMap = new Map(validAssets.map(a => [a.id, a]));
return (
<section className="editorial-section">
<p className="editorial-kicker">Merkzettel</p>
<h1>Dein Leuchtkasten</h1>
<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>
{items.length === 0 ? (
<p className="mt-8 text-gray-500">Dein Leuchtkasten ist leer.</p>
<p className="text-muted-foreground text-center py-12">Dein Leuchtkasten ist leer.</p>
) : (
<>
<div className="flex justify-between items-center mb-8">
<p className="text-sm text-gray-600">
<div className="flex justify-between items-center bg-card p-4 rounded-xl border border-border shadow-sm">
<p className="text-sm font-medium text-muted-foreground">
{items.length} {items.length === 1 ? 'Bild' : 'Bilder'} gemerkt
</p>
<DownloadLightboxForm assetIds={items.map(i => i.assetId)} />
</div>
<ul className="photo-contact-sheet">
<ul className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
{items.map((item) => {
const asset = assetMap.get(item.assetId);
if (!asset) return null;
return (
<li key={item.assetId} className="photo-contact-frame relative group">
<Link href={`/redaktion/nutzungen/neu?assetId=${item.assetId}`} className="contact-sheet-link">
<Image
alt={asset.originalFileName}
className="contact-sheet-image"
height={200}
src={`/api/assets/${encodeURIComponent(item.assetId)}/thumbnail`}
width={300}
/>
<div className="contact-strip">
<span className="contact-strip-name" title={asset.originalFileName}>
{asset.originalFileName}
<li key={item.assetId} className="relative group rounded-xl overflow-hidden border border-border bg-card shadow-sm transition-all hover:shadow-md hover:-translate-y-1">
<Link href={`/redaktion/nutzungen/neu?assetId=${item.assetId}`} className="block">
<div className="aspect-[3/2] w-full overflow-hidden bg-muted">
<Image
alt={asset.originalFileName ?? "Bild"}
className="w-full h-full object-cover transition-transform duration-300 group-hover:scale-105"
height={200}
src={`/api/assets/${encodeURIComponent(item.assetId)}/thumbnail`}
width={300}
/>
</div>
<div className="p-3 border-t border-border bg-card">
<span className="block truncate text-xs font-medium text-muted-foreground" title={asset.originalFileName}>
{asset.originalFileName ?? "Unbekannt"}
</span>
</div>
</Link>
@@ -66,6 +69,6 @@ export default async function LightboxPage() {
</ul>
</>
)}
</section>
</div>
);
}