feat: add cross-album search, auto-rules, album UI redesign, editorial archiving and pdf download

This commit is contained in:
Leon Tonhäuser committed 2026-08-11 02:53:15 +02:00
1 parent 9c0d43b1ec
commit 375e5b8b7d
23 files changed
+1153 -43

No files matched your search

+9 -34
View File
@@ -9,6 +9,7 @@ import { albumGrantService } from "@/modules/albums/grants";
import { grantAlbumAction, revokeAlbumAction } from "./actions";
import { loadAssignableAlbums } from "./page-content";
import { AlbumGrid } from "./AlbumGrid";
export default async function EditorialAlbumsPage({
params,
@@ -50,45 +51,19 @@ export default async function EditorialAlbumsPage({
</p>
<p>
<Link href={`/admin/redaktionen/${editorial.id}`}>Zurück zur Redaktion</Link>
{" · "}
<Link href={`/admin/redaktionen/${editorial.id}/auto-regeln`}>Auto-Zuweisungsregeln verwalten</Link>
</p>
{albumResult.albums.length === 0 ? (
<p>Derzeit sind keine zuweisbaren Alben vorhanden.</p>
) : (
<ul aria-label="Zuweisbare Immich-Alben">
{albumResult.albums.map((album) => {
const action = album.isGranted ? revokeAlbumAction : grantAlbumAction;
return (
<li key={album.id}>
<article aria-labelledby={`album-${album.id}`}>
{album.albumThumbnailAssetId ? (
<Image
alt={`Titelbild von ${album.albumName}`}
height={120}
src={`/api/assets/${encodeURIComponent(album.albumThumbnailAssetId)}/thumbnail?albumId=${encodeURIComponent(album.id)}`}
width={160}
/>
) : (
<div aria-label="Kein Albumcover verfügbar" role="img">
Kein Cover
</div>
)}
<h2 id={`album-${album.id}`}>{album.albumName}</h2>
<p>{album.assetCount} Fotos</p>
<p>
Status: <strong>{album.isGranted ? "Zugewiesen" : "Nicht zugewiesen"}</strong>
</p>
<form action={action.bind(null, editorial.id)}>
<input name="immichAlbumId" type="hidden" value={album.id} />
<button type="submit">
{album.isGranted ? "Zuweisung aufheben" : "Album zuweisen"}
</button>
</form>
</article>
</li>
);
})}
</ul>
<AlbumGrid
albums={albumResult.albums}
editorialId={editorial.id}
grantAction={grantAlbumAction}
revokeAction={revokeAlbumAction}
/>
)}
</section>
);