feat(admin): Library pages on the web panel (owner review 2, R6)

The web panel now manages the library without editing it: the owner can
browse and view sequences and photos, delete sequences and photos into the
archive's trash, restore or empty the trash and run mass operations, as
R6 asks, on top of the engine endpoints of the previous commit.

- Library page right after the Dashboard: search, Year/Camera/Status/Tag
  filters fed by a new GET /api/v1/sequences/facets, sort, cards or list
  (remembered per browser), lazy cover thumbnails, Load more by cursor,
  multi-select with Shift ranges and "Select all N" of the filter, and a
  sticky bar for the selection: Analyse, Proxies, Thumbnails, Verify,
  Tags (add/remove), Export CSV (client-side) and Delete (dry run, list
  of what moves to the trash, then the move). Filters live in the address,
  so Back from a sequence finds them again.
- Sequence view (#/library?id=): inline title, tags, rating and notes,
  facts, photos in pages of 500 with content-visibility, a photo viewer
  (proxy, arrows, Esc, Exif facts), Set cover, Download original, Delete
  photos (typing the count above 20 photos), Delete sequence, renders to
  download. No video editing controls.
- Trash view (#/library?view=trash, also linked from Archive): entries,
  Restore, and Empty (dry run, list, the localised word typed, the plan's
  fingerprint sent back, the job followed to its end).
- Live updates from sequenceChanged and jobState; keyboard grid (one tab
  stop, arrows, Space, Shift+Space, Enter, Ctrl+A, Esc); RTL, dark theme.
- GET /sequences takes rendered=true|false for the Status filter.
- ui.js: confirmDialog's typed confirmation by name, word or count, with a
  list of what the action concerns; formDialog. api.js: putBytes for the
  web upload, which the Library imports on demand (upload.js, optional).
- New web icons from icons.py (Image for the Library, trash, grid/list,
  arrows, stars, cover); directional glyphs mirror in right-to-left pages.
- Strings in en and it; tests for the facets (both dialects), the rendered
  filter, the menu, the modules and the on-demand upload import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 029cf334f66cb6fa1265b96a6f8faff2964c11ea)
This commit is contained in:
Alby96 committed 2026-10-27 10:51:04 +01:00
1 parent 51782a3ada
commit aa1d4913a3
23 files changed
+2540 -31

No files matched your search

+12
View File
@@ -65,3 +65,15 @@ public sealed record BulkItemResult(Guid Id, string Outcome, string? Reason = nu
/// and the job a bulk job request queued (null when nothing was queued).
/// </summary>
public sealed record BulkResultDto(IReadOnlyList<BulkItemResult> Items, int Ok, int Skipped, bool DryRun, int Photos = 0, long Bytes = 0, JobDto? Job = null);
/// <summary>
/// A value a Library filter offers: <see cref="Value"/> as <c>GET /api/v1/sequences</c> takes it (<c>year</c>, <c>camera</c>,
/// <c>tag</c>), the sequences that have it, and the label a menu shows when it differs (a camera model with its make).
/// </summary>
public sealed record FacetDto(string Value, int Sequences, string? Label = null);
/// <summary>
/// <c>GET /api/v1/sequences/facets</c> (owner review 2, R6): the years of first capture (newest first), camera models (most
/// sequences first) and tags in use (by name) of the archive's sequences, for the admin panel's Library filters.
/// </summary>
public sealed record LibraryFacetsDto(IReadOnlyList<FacetDto> Years, IReadOnlyList<FacetDto> Cameras, IReadOnlyList<FacetDto> Tags);
+1
View File
@@ -86,4 +86,5 @@ namespace Chronos.Protocol;
[JsonSerializable(typeof(BulkJobsRequest))]
[JsonSerializable(typeof(BulkItemResult))]
[JsonSerializable(typeof(BulkResultDto))]
[JsonSerializable(typeof(LibraryFacetsDto))]
public sealed partial class ProtocolJson : JsonSerializerContext;