Skip to content

feat: QR device-code display enrollment + upload UX improvements - #73

Open
abwagner wants to merge 15 commits into
mainfrom
qr-enrollment-and-upload-ux
Open

feat: QR device-code display enrollment + upload UX improvements#73
abwagner wants to merge 15 commits into
mainfrom
qr-enrollment-and-upload-ux

Conversation

@abwagner

Copy link
Copy Markdown
Owner

Summary

  • QR enrollment: Pi shows a QR code on the enroll page; authorized user scans with phone, logs in, taps Approve — Pi auto-redirects to the display. Manual secret entry kept as a collapsed fallback.
  • Approval success screen: shows a styled ✓ confirmation with "you can close this tab" instead of raw JSON
  • Edit as modal: clicking Edit on any image/group opens a centered overlay popup instead of jumping to a panel at the top of the page; click backdrop to dismiss
  • Download button: ⬇ added to image cards, the single-image popup, and each image row inside group popups
  • Mat color off cards: removed from gallery card grid (still accessible in the edit popup)
  • Ctrl/Cmd+click: holding Ctrl (or Cmd on Mac) while clicking a card enters group-select mode and selects it in one gesture
  • Button sizing: Hide/⬇/🗑 row sizes to content instead of equal-width stretch

Test plan

  • frame.swagner.tech/display → enroll page shows QR, scan → phone login → Approve → ✓ screen → Pi loads display
  • Ctrl/Cmd+click image cards enters select mode and selects them
  • Edit popup opens as modal, backdrop click closes it
  • Download links trigger file download

🤖 Generated with Claude Code

abwagner and others added 15 commits July 18, 2026 18:01
Display enrollment:
- Replace manual-secret entry with QR device-code flow: Pi shows a QR
  code, authorized user scans on phone, clicks Approve, Pi auto-loads
- Approval page shows success state with "close this tab" message
  instead of raw JSON response
- Manual secret entry kept as collapsed fallback

Upload page:
- Edit popup is now a centered modal overlay (click backdrop to close)
  instead of a panel at the top of the page requiring scroll
- Download button (⬇) added to image cards, single-image popup, and
  group image rows
- Remove mat color picker from gallery cards (still in edit popup)
- Ctrl/Cmd+click on an image card enters group-select mode and selects
  it in one gesture
- Button row sizes to content instead of stretching equally

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add suggest_mat_color() using Pillow + colorsys: samples edge pixels for
  warmth/hue, maps overall brightness to mat lightness (bright→dark mat,
  dark→light mat), heavily desaturates for a neutral frame look
- Call at upload time and store as mat_color in image metadata
- Backfill all existing images at startup (background thread)
- Extend ctrl/cmd+click group selection to the entire card area, not just
  the image thumbnail (capture-phase listener excludes .card-actions buttons)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move settings sidebar into a modal overlay (⚙ Settings button in header)
- Replace drop zone with page-level drag & drop anywhere + 📤 Upload button
  in toolbar; full-page translucent overlay shows while dragging
- Add auto_mat_color toggle in mat settings (disables per-image suggestion
  on new uploads when off)
- Consolidate admin pages: new /admin hub page, update /admin/users nav to
  match upload.html style, remove emoji inconsistencies
- Give mfa.html proper dark-theme styling using shared admin_users.css
- Standardize nav across all pages: Admin/Photos/Backup/MFA/Password/Logout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Skip rclone sync when no files have changed since the last successful
  backup; log as 'no_changes' so the history is explicit about it
- Add max_backup_history setting (default 30, range 1-200); exposed in
  backup settings panel and respected by save_backup_log()
- History table and status indicator handle the 'no_changes' result

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Consecutive ungrouped portrait singles (height/width > 1.15) are now
automatically paired side-by-side in the slide list, identical to manual
groups. Invisible to gallery UI — purely a display-time transform.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…minance

Classic bevel kept as-is. New 'Bevel (lit)' mode uses white highlights on
top/left edges and dark shadows on bottom/right, with alpha scaling by mat
luminance so dark mats get a stronger white edge to read against.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Apply button is now right-aligned (not full-width) and flashes green with
'✓ Applied' text for 1.5s on success. Color preset active state now uses a
double box-shadow ring that shows clearly against any swatch color.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Top/bottom strips now own the full-width corners; left/right strips are
trimmed by bevel-width on each end so no two strips ever cover the same
corner pixel. Removes the white overexposure at top-left in lit bevel mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion

Replaces fixed luminance-based highlight with three user-controlled sliders:
intensity (0-100%), vertical light position (0=top, 100=bottom), horizontal
(0=left, 100=right). Defaults to 50/15/15 (slight top-left bias). Sliders
appear only when Bevel (lit) is selected. Rectangular strips preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g, fullscreen

Crop UI:
- Fixed-aspect-ratio lock with ratio dropdown (1:1, 4:3, 3:2, 16:9, 9:16, 2:3, 3:4)
- Zoom slider for preview magnification during crop
- Toolbar repositions to right side for portrait images, bottom for landscape

Per-image display options:
- No-mat / cover mode: fills screen edge-to-edge with zoom support
- Fix: render_snapshot was dropping no_mat field so renderer never saw it
- Fix: gallery preview now renders cover mode when no_mat is set

Bevel-lit improvements:
- Extended shadow across full bevel width using power-curve cross-strip fade (^0.4)
- Removed white highlight branch from _edge_color_lit; all faces now render shadow
  (lit faces get less shadow, unlit faces get more — no face is ever at 0%)
- Group bevel consistency: _render_group_row/_render_group_grid now use group-level
  bevel_width/border_effect rather than per-image overrides, eliminating mixed
  bevel styles within a single group slide

Portrait auto-pairing:
- Pairer now collects all ungrouped portrait singles and pairs them globally
  instead of only pairing adjacent ones; no portrait left unpaired due to
  intervening landscape or explicit group slides

Display page:
- Fullscreen toggle button (⛶ Full / ⛶ Exit Full) + F keyboard shortcut

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant