Ships `dev` as **v0.11.0**. `main` contains nothing that `dev` does not, so this is a clean sync. ## Headline changes since v0.10.0 - **Journal & Journal Studio** — photo essays at `/journal`, split-screen block editor with live preview, drafts, per-entry passwords, cover images - **First-run setup wizard at `/install`** — configure a fresh deployment from the browser; credentials are verified against Immich before anything is written, and the wizard is gated by a one-time token - **About page editor and toggle** in the admin panel - **Per-album photo order** independent of Immich, with a drag & drop editor - **Custom favicon upload** - **Experimental portfolio features** — justified grid, `cover` hero, unlisted subpages, per-album grid overrides, cover focal points, external nav links - **Security** — asset tokens length-capped before decoding (#423), journal author markdown escaped rather than filtered, journal file paths contained, admin session key derived with scrypt (#432), Next.js 16.3.0 for CVE-2025-13465 - **Fixed** — client proofing honours its own configuration again (#454); journal photo rendering (#432) Full detail in [CHANGELOG.md](CHANGELOG.md#0110--2026-08-15). ## Verified `npx tsc --noEmit` clean · `npx vitest run` 435 tests pass · `npm run build` succeeds · lint 0 errors · `prettier --check` clean · local `docker build` of the release tree. ## After merge Tag `v0.11.0` on `main` and publish the release — that triggers `docker-publish.yml`, which pushes the image and moves `latest`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: ralksta <ralksta@users.noreply.github.com> Co-authored-by: lancetm714 <108419425+lancetm714@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
116 lines
3.6 KiB
TypeScript
116 lines
3.6 KiB
TypeScript
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';
|
|
import type { LightboxWatermark } from '@/components/Lightbox';
|
|
import Image from 'next/image';
|
|
import React from 'react';
|
|
|
|
interface AlbumDetailViewProps {
|
|
album: ImmichAlbum;
|
|
images: PhotoItem[];
|
|
layout: GridConfig['layout'];
|
|
gridStyle: React.CSSProperties;
|
|
backLinkHref: string;
|
|
backLinkLabel: string;
|
|
subtitle?: string;
|
|
heroImageUrl?: string;
|
|
heroBlurDataURL?: string;
|
|
watermark?: LightboxWatermark;
|
|
/** Client proofing — favorite hearts, selection bar and send-off modal. */
|
|
proofing?: boolean;
|
|
/** Offer the "send by email" button in the proofing modal. */
|
|
allowMailto?: boolean;
|
|
}
|
|
|
|
/**
|
|
* 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()}`;
|
|
}
|
|
|
|
export function AlbumDetailView({
|
|
album,
|
|
images,
|
|
layout,
|
|
gridStyle,
|
|
backLinkHref,
|
|
backLinkLabel,
|
|
subtitle,
|
|
heroImageUrl,
|
|
heroBlurDataURL,
|
|
watermark,
|
|
proofing,
|
|
allowMailto,
|
|
}: AlbumDetailViewProps) {
|
|
const metaDetail = albumMetaDetail(album);
|
|
|
|
return (
|
|
<>
|
|
{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' : ''}`}>
|
|
<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>
|
|
<p className="album-header__meta">
|
|
<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>}
|
|
</p>
|
|
</div>
|
|
<PhotoGrid
|
|
assets={images}
|
|
layout={layout}
|
|
gridStyle={gridStyle}
|
|
watermark={watermark}
|
|
proofing={proofing}
|
|
allowMailto={allowMailto}
|
|
/>
|
|
</>
|
|
);
|
|
}
|