2026-03-08 18:55:45 +01:00
|
|
|
import type { ImmichAlbum } from '@/lib/immich';
|
|
|
|
|
import type { PhotoItem } from './PhotoGrid';
|
|
|
|
|
import { PhotoGrid } from './PhotoGrid';
|
|
|
|
|
import { BackLink } from '@/components/BackLink';
|
|
|
|
|
import type { GridConfig } from '@/lib/config';
|
security: add Trivy container scan to Docker publish workflow (#399)
* feat(admin): add backup manager UI with 1-click restore
* feat(admin): collapse older backup entries by default
* fix(theme): isolate admin layout, instant DOM theme updates, and add Light/Dark mode toggle
* feat(admin): replace text controls for Photo Frame and Hero Style with visual preview cards
* fix(admin): define missing CSS rules for button system (.btn, .preset-btn)
* feat(admin): redesign theme settings with segmented mode toggle, accent color swatches, and custom iOS-style toggle cards
* feat(admin): upgrade all settings tabs with visual grid previews, Google SEO snippet preview, and toggle cards
* feat(admin): overhaul Pages Builder UX with slide-over drawer, card hover badges, real-time search, and floating save bar
* fix(admin): remove leftover dangling syntax snippet in PageBuilder.tsx
* fix(admin): add position: relative to subpage-tile so hover overlay is contained inside the tile
* style(admin): replace all emojis with clean Leica-style vector SVG icons
* fix(types): extend IconProps with SVGProps to allow style prop on Leica SVG icons
* feat(admin): add subpage live-preview, privacy analytics, and asset protection settings
* fix(typecheck): fix AlbumEntry property access in subpage drawer preview mode
* fix(types): fix ImmichAlbumInfo property names thumbnailAssetId and albumName in PageBuilder.tsx
* fix(types): add protection and watermark optional properties to AppConfig interface
* feat(settings): add toggle for disabling analytics tracking (defaults to enabled)
* feat(ux): show status banner when analytics tracking is disabled + add live sync indicator
* feat(watermark): render customizable watermark overlay on Lightbox images + rename section to Portfolio Features & Modules
* fix(types): import type LightboxWatermark in PhotoGrid.tsx
* fix(types): destructure watermark prop in PhotoGrid function signature
* feat(seo): add configurable subpage title template and metadata descriptions
* feat(seo): add generateMetadata to about page for title template support
* feat(proofing): add client proofing, favorites selection, compact URL bitmasking, and export modal
* feat(essay): add Photo Essay storytelling mode with RSC markdown parser and fullbleed/pair layouts
* feat(subpages): add page enabled toggle to deactivate subpages without deleting them
* feat(admin): add visual essay block builder for photo essay storytelling pages
* security: add Trivy container scan to Docker publish workflow
Scans the built image for CRITICAL/HIGH CVEs on every release and
uploads results to the GitHub Security tab. Non-blocking for now
(exit-code 0) so releases aren't gated on findings. Also documents
the scan and existing Dependabot coverage in the README.
---------
Co-authored-by: ralksta <ralksta@users.noreply.github.com>
2026-08-07 11:08:04 +02:00
|
|
|
import type { LightboxWatermark } from '@/components/Lightbox';
|
2026-05-30 15:33:43 +02:00
|
|
|
import Image from 'next/image';
|
2026-03-08 18:55:45 +01:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
|
|
interface AlbumDetailViewProps {
|
2026-03-12 11:30:45 +00:00
|
|
|
album: ImmichAlbum;
|
|
|
|
|
images: PhotoItem[];
|
|
|
|
|
layout: GridConfig['layout'];
|
|
|
|
|
gridStyle: React.CSSProperties;
|
|
|
|
|
backLinkHref: string;
|
|
|
|
|
backLinkLabel: string;
|
|
|
|
|
subtitle?: string;
|
2026-05-30 15:33:43 +02:00
|
|
|
heroImageUrl?: string;
|
|
|
|
|
heroBlurDataURL?: string;
|
security: add Trivy container scan to Docker publish workflow (#399)
* feat(admin): add backup manager UI with 1-click restore
* feat(admin): collapse older backup entries by default
* fix(theme): isolate admin layout, instant DOM theme updates, and add Light/Dark mode toggle
* feat(admin): replace text controls for Photo Frame and Hero Style with visual preview cards
* fix(admin): define missing CSS rules for button system (.btn, .preset-btn)
* feat(admin): redesign theme settings with segmented mode toggle, accent color swatches, and custom iOS-style toggle cards
* feat(admin): upgrade all settings tabs with visual grid previews, Google SEO snippet preview, and toggle cards
* feat(admin): overhaul Pages Builder UX with slide-over drawer, card hover badges, real-time search, and floating save bar
* fix(admin): remove leftover dangling syntax snippet in PageBuilder.tsx
* fix(admin): add position: relative to subpage-tile so hover overlay is contained inside the tile
* style(admin): replace all emojis with clean Leica-style vector SVG icons
* fix(types): extend IconProps with SVGProps to allow style prop on Leica SVG icons
* feat(admin): add subpage live-preview, privacy analytics, and asset protection settings
* fix(typecheck): fix AlbumEntry property access in subpage drawer preview mode
* fix(types): fix ImmichAlbumInfo property names thumbnailAssetId and albumName in PageBuilder.tsx
* fix(types): add protection and watermark optional properties to AppConfig interface
* feat(settings): add toggle for disabling analytics tracking (defaults to enabled)
* feat(ux): show status banner when analytics tracking is disabled + add live sync indicator
* feat(watermark): render customizable watermark overlay on Lightbox images + rename section to Portfolio Features & Modules
* fix(types): import type LightboxWatermark in PhotoGrid.tsx
* fix(types): destructure watermark prop in PhotoGrid function signature
* feat(seo): add configurable subpage title template and metadata descriptions
* feat(seo): add generateMetadata to about page for title template support
* feat(proofing): add client proofing, favorites selection, compact URL bitmasking, and export modal
* feat(essay): add Photo Essay storytelling mode with RSC markdown parser and fullbleed/pair layouts
* feat(subpages): add page enabled toggle to deactivate subpages without deleting them
* feat(admin): add visual essay block builder for photo essay storytelling pages
* security: add Trivy container scan to Docker publish workflow
Scans the built image for CRITICAL/HIGH CVEs on every release and
uploads results to the GitHub Security tab. Non-blocking for now
(exit-code 0) so releases aren't gated on findings. Also documents
the scan and existing Dependabot coverage in the README.
---------
Co-authored-by: ralksta <ralksta@users.noreply.github.com>
2026-08-07 11:08:04 +02:00
|
|
|
watermark?: LightboxWatermark;
|
2026-03-08 18:55:45 +01:00
|
|
|
}
|
|
|
|
|
|
chore(release): v0.10.0 (#400)
Photo Essay mode, client proofing, studio-modern preset, admin panel overhaul, watermark, cookieless analytics, subpage toggle, SEO title templates. Analytics API now admin-only, Trivy scan on publish. Album order mirrors the Immich timeline; map theme, admin status panel, lightbox counter and Docker health check fixed.
See CHANGELOG.md for the full list and the health-check upgrade note.
2026-08-10 09:56:20 +02:00
|
|
|
/**
|
|
|
|
|
* Extra detail for the album header — shooting date and camera/lens, read off
|
|
|
|
|
* the first asset that carries EXIF. Both are rendered in their own spans and
|
|
|
|
|
* hidden by default; only presets that ask for them show them, so the header
|
|
|
|
|
* keeps reading "86 photos" everywhere else.
|
|
|
|
|
*/
|
|
|
|
|
function albumMetaDetail(album: ImmichAlbum): { date?: string; gear?: string } {
|
|
|
|
|
const first = album.assets.find((a) => a.exifInfo);
|
|
|
|
|
const exif = first?.exifInfo;
|
|
|
|
|
|
|
|
|
|
const taken = exif?.dateTimeOriginal || first?.fileCreatedAt;
|
|
|
|
|
const gear = [exif?.model, exif?.lensModel].filter(Boolean).join(' · ');
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
...(taken ? { date: formatMonthYear(taken) } : {}),
|
|
|
|
|
...(gear ? { gear } : {}),
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function formatMonthYear(iso: string): string | undefined {
|
|
|
|
|
const d = new Date(iso);
|
|
|
|
|
if (Number.isNaN(d.getTime())) return undefined;
|
|
|
|
|
return `${String(d.getMonth() + 1).padStart(2, '0')}/${d.getFullYear()}`;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-08 18:55:45 +01:00
|
|
|
export function AlbumDetailView({
|
2026-03-12 11:30:45 +00:00
|
|
|
album,
|
|
|
|
|
images,
|
|
|
|
|
layout,
|
|
|
|
|
gridStyle,
|
|
|
|
|
backLinkHref,
|
|
|
|
|
backLinkLabel,
|
|
|
|
|
subtitle,
|
2026-05-30 15:33:43 +02:00
|
|
|
heroImageUrl,
|
|
|
|
|
heroBlurDataURL,
|
security: add Trivy container scan to Docker publish workflow (#399)
* feat(admin): add backup manager UI with 1-click restore
* feat(admin): collapse older backup entries by default
* fix(theme): isolate admin layout, instant DOM theme updates, and add Light/Dark mode toggle
* feat(admin): replace text controls for Photo Frame and Hero Style with visual preview cards
* fix(admin): define missing CSS rules for button system (.btn, .preset-btn)
* feat(admin): redesign theme settings with segmented mode toggle, accent color swatches, and custom iOS-style toggle cards
* feat(admin): upgrade all settings tabs with visual grid previews, Google SEO snippet preview, and toggle cards
* feat(admin): overhaul Pages Builder UX with slide-over drawer, card hover badges, real-time search, and floating save bar
* fix(admin): remove leftover dangling syntax snippet in PageBuilder.tsx
* fix(admin): add position: relative to subpage-tile so hover overlay is contained inside the tile
* style(admin): replace all emojis with clean Leica-style vector SVG icons
* fix(types): extend IconProps with SVGProps to allow style prop on Leica SVG icons
* feat(admin): add subpage live-preview, privacy analytics, and asset protection settings
* fix(typecheck): fix AlbumEntry property access in subpage drawer preview mode
* fix(types): fix ImmichAlbumInfo property names thumbnailAssetId and albumName in PageBuilder.tsx
* fix(types): add protection and watermark optional properties to AppConfig interface
* feat(settings): add toggle for disabling analytics tracking (defaults to enabled)
* feat(ux): show status banner when analytics tracking is disabled + add live sync indicator
* feat(watermark): render customizable watermark overlay on Lightbox images + rename section to Portfolio Features & Modules
* fix(types): import type LightboxWatermark in PhotoGrid.tsx
* fix(types): destructure watermark prop in PhotoGrid function signature
* feat(seo): add configurable subpage title template and metadata descriptions
* feat(seo): add generateMetadata to about page for title template support
* feat(proofing): add client proofing, favorites selection, compact URL bitmasking, and export modal
* feat(essay): add Photo Essay storytelling mode with RSC markdown parser and fullbleed/pair layouts
* feat(subpages): add page enabled toggle to deactivate subpages without deleting them
* feat(admin): add visual essay block builder for photo essay storytelling pages
* security: add Trivy container scan to Docker publish workflow
Scans the built image for CRITICAL/HIGH CVEs on every release and
uploads results to the GitHub Security tab. Non-blocking for now
(exit-code 0) so releases aren't gated on findings. Also documents
the scan and existing Dependabot coverage in the README.
---------
Co-authored-by: ralksta <ralksta@users.noreply.github.com>
2026-08-07 11:08:04 +02:00
|
|
|
watermark,
|
2026-03-08 18:55:45 +01:00
|
|
|
}: AlbumDetailViewProps) {
|
chore(release): v0.10.0 (#400)
Photo Essay mode, client proofing, studio-modern preset, admin panel overhaul, watermark, cookieless analytics, subpage toggle, SEO title templates. Analytics API now admin-only, Trivy scan on publish. Album order mirrors the Immich timeline; map theme, admin status panel, lightbox counter and Docker health check fixed.
See CHANGELOG.md for the full list and the health-check upgrade note.
2026-08-10 09:56:20 +02:00
|
|
|
const metaDetail = albumMetaDetail(album);
|
|
|
|
|
|
2026-03-12 11:30:45 +00:00
|
|
|
return (
|
|
|
|
|
<>
|
2026-05-30 15:33:43 +02:00
|
|
|
{heroImageUrl && (
|
|
|
|
|
<div className="album-hero">
|
|
|
|
|
<Image
|
|
|
|
|
src={heroImageUrl}
|
|
|
|
|
alt={album.albumName}
|
|
|
|
|
fill
|
|
|
|
|
priority
|
|
|
|
|
sizes="100vw"
|
|
|
|
|
style={{ objectFit: 'cover' }}
|
|
|
|
|
{...(heroBlurDataURL ? { placeholder: 'blur' as const, blurDataURL: heroBlurDataURL } : {})}
|
|
|
|
|
/>
|
|
|
|
|
<div className="album-hero__overlay" />
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
<div className={`album-header${heroImageUrl ? ' album-header--has-hero' : ''}`}>
|
chore(release): v0.10.0 (#400)
Photo Essay mode, client proofing, studio-modern preset, admin panel overhaul, watermark, cookieless analytics, subpage toggle, SEO title templates. Analytics API now admin-only, Trivy scan on publish. Album order mirrors the Immich timeline; map theme, admin status panel, lightbox counter and Docker health check fixed.
See CHANGELOG.md for the full list and the health-check upgrade note.
2026-08-10 09:56:20 +02:00
|
|
|
<div className="album-header__main">
|
|
|
|
|
<BackLink href={backLinkHref} label={backLinkLabel} />
|
|
|
|
|
<h1 className="album-header__title">{album.albumName}</h1>
|
|
|
|
|
{subtitle && (
|
|
|
|
|
<p className="subpage-subtitle" style={{ textAlign: 'left', marginLeft: 0 }}>
|
|
|
|
|
{subtitle}
|
|
|
|
|
</p>
|
|
|
|
|
)}
|
|
|
|
|
{album.description && <p className="album-header__description">{album.description}</p>}
|
|
|
|
|
</div>
|
2026-03-12 11:30:45 +00:00
|
|
|
<p className="album-header__meta">
|
chore(release): v0.10.0 (#400)
Photo Essay mode, client proofing, studio-modern preset, admin panel overhaul, watermark, cookieless analytics, subpage toggle, SEO title templates. Analytics API now admin-only, Trivy scan on publish. Album order mirrors the Immich timeline; map theme, admin status panel, lightbox counter and Docker health check fixed.
See CHANGELOG.md for the full list and the health-check upgrade note.
2026-08-10 09:56:20 +02:00
|
|
|
<span className="album-header__meta-count">
|
|
|
|
|
{images.length} {images.length === 1 ? 'photo' : 'photos'}
|
|
|
|
|
</span>
|
|
|
|
|
{metaDetail.date && (
|
|
|
|
|
<span className="album-header__meta-date"> · {metaDetail.date}</span>
|
|
|
|
|
)}
|
|
|
|
|
{metaDetail.gear && (
|
|
|
|
|
<span className="album-header__meta-gear">{metaDetail.gear}</span>
|
|
|
|
|
)}
|
2026-03-12 11:30:45 +00:00
|
|
|
</p>
|
|
|
|
|
</div>
|
security: add Trivy container scan to Docker publish workflow (#399)
* feat(admin): add backup manager UI with 1-click restore
* feat(admin): collapse older backup entries by default
* fix(theme): isolate admin layout, instant DOM theme updates, and add Light/Dark mode toggle
* feat(admin): replace text controls for Photo Frame and Hero Style with visual preview cards
* fix(admin): define missing CSS rules for button system (.btn, .preset-btn)
* feat(admin): redesign theme settings with segmented mode toggle, accent color swatches, and custom iOS-style toggle cards
* feat(admin): upgrade all settings tabs with visual grid previews, Google SEO snippet preview, and toggle cards
* feat(admin): overhaul Pages Builder UX with slide-over drawer, card hover badges, real-time search, and floating save bar
* fix(admin): remove leftover dangling syntax snippet in PageBuilder.tsx
* fix(admin): add position: relative to subpage-tile so hover overlay is contained inside the tile
* style(admin): replace all emojis with clean Leica-style vector SVG icons
* fix(types): extend IconProps with SVGProps to allow style prop on Leica SVG icons
* feat(admin): add subpage live-preview, privacy analytics, and asset protection settings
* fix(typecheck): fix AlbumEntry property access in subpage drawer preview mode
* fix(types): fix ImmichAlbumInfo property names thumbnailAssetId and albumName in PageBuilder.tsx
* fix(types): add protection and watermark optional properties to AppConfig interface
* feat(settings): add toggle for disabling analytics tracking (defaults to enabled)
* feat(ux): show status banner when analytics tracking is disabled + add live sync indicator
* feat(watermark): render customizable watermark overlay on Lightbox images + rename section to Portfolio Features & Modules
* fix(types): import type LightboxWatermark in PhotoGrid.tsx
* fix(types): destructure watermark prop in PhotoGrid function signature
* feat(seo): add configurable subpage title template and metadata descriptions
* feat(seo): add generateMetadata to about page for title template support
* feat(proofing): add client proofing, favorites selection, compact URL bitmasking, and export modal
* feat(essay): add Photo Essay storytelling mode with RSC markdown parser and fullbleed/pair layouts
* feat(subpages): add page enabled toggle to deactivate subpages without deleting them
* feat(admin): add visual essay block builder for photo essay storytelling pages
* security: add Trivy container scan to Docker publish workflow
Scans the built image for CRITICAL/HIGH CVEs on every release and
uploads results to the GitHub Security tab. Non-blocking for now
(exit-code 0) so releases aren't gated on findings. Also documents
the scan and existing Dependabot coverage in the README.
---------
Co-authored-by: ralksta <ralksta@users.noreply.github.com>
2026-08-07 11:08:04 +02:00
|
|
|
<PhotoGrid assets={images} layout={layout} gridStyle={gridStyle} watermark={watermark} />
|
2026-03-12 11:30:45 +00:00
|
|
|
</>
|
|
|
|
|
);
|
2026-03-08 18:55:45 +01:00
|
|
|
}
|