Gate shares behind magic-link sessions, add comments and new-photo email digests

This commit is contained in:
zyphlar
2026-10-19 15:10:57 -07:00
parent c8d8dc9dbc
commit f598200e24
34 changed files with 3387 additions and 375 deletions
+5 -1
View File
@@ -3,7 +3,7 @@
// top-level `let`s. Layout / scroll-tuning constants live here too because
// they are read by multiple modules. SVG icon strings live in `icons.ts`.
import type { GalleryItem, LightboxConfig, MetadataConfig, GroupByDateMode } from '../shared/types.js'
import type { CommentsConfig, GalleryItem, LightboxConfig, MetadataConfig, GroupByDateMode } from '../shared/types.js'
// ----- layout / scroll tuning ----------------------------------------------
@@ -28,6 +28,8 @@ export const LONG_PRESS_MS = 500
export const SIDEBAR_STORAGE_KEY = 'ipp-sidebar-open'
// Width of the sidebar when docked (must match the CSS rule)
export const SIDEBAR_WIDTH = 360
// Height of the sidebar as a bottom sheet, as a fraction of the viewport (must match the CSS 60vh)
export const SIDEBAR_SHEET_FRACTION = 0.6
// ----- mutable state -------------------------------------------------------
@@ -95,6 +97,8 @@ export const state = {
sidebarOpen: false,
// Base URL (`/share/meta/<key>`) for the on-demand per-asset metadata route.
metaBase: '',
// Comments API and per-photo counts; null when commenting isn't available
comments: null as CommentsConfig | null,
// Re-render callbacks registered by lightbox UI elements (sidebar, caption,
// download button). Each re-renders for the current slide. Invoked after a
// lazy item's detail arrives so the just-opened slide reflects it.