From 52e85703f762ce2cc60ca10c58cae1796f920e59 Mon Sep 17 00:00:00 2001 From: Matt Edholm Date: Wed, 6 May 2026 14:45:59 -0400 Subject: [PATCH] feat: orientation toggle and mismatch indicator in crop editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The crop tool now exposes a landscape/portrait toggle next to the device-name label, and the canvas crop frame snaps to the chosen aspect when toggled. Choosing an orientation that does not match the target frame's current orientation surfaces a yellow informational chip — purely informational, no action required, clears as soon as the user toggles back to the matching orientation (or changes the frame in Settings). The chosen orientation rides along on the upload/reprocess request as a new cropOrientation form field and is persisted on the Image entity, so the library view and rotation logic can later surface the same mismatch state for already-uploaded photos. Existing photos without a stored orientation get null and are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/src/components/CropEditor.vue | 158 +++++++++++++++++--- frontend/src/stores/images.ts | 15 +- frontend/src/stores/upload.ts | 14 +- frontend/src/test/stores/images.test.ts | 1 + frontend/src/test/stores/upload.test.ts | 6 +- frontend/src/test/views/LibraryView.test.ts | 1 + frontend/src/types/index.ts | 1 + frontend/src/views/UploadView.vue | 17 ++- migrations/Version20260507220000.php | 26 ++++ src/Controller/ImageApiController.php | 11 ++ src/Entity/Image.php | 13 ++ 11 files changed, 225 insertions(+), 38 deletions(-) create mode 100644 migrations/Version20260507220000.php diff --git a/frontend/src/components/CropEditor.vue b/frontend/src/components/CropEditor.vue index dc3a484..3105213 100644 --- a/frontend/src/components/CropEditor.vue +++ b/frontend/src/components/CropEditor.vue @@ -8,7 +8,44 @@ @pointerup="onPointerUp" @pointercancel="onPointerUp" /> -
{{ deviceName }}
+ +
+
{{ deviceName }}
+ + +
+ +
+ + +
+ + Frame is set to {{ orientation }}. Switch the frame in Settings to display this crop. +
+
+
Use this crop @@ -18,25 +55,45 @@