diff --git a/CHANGELOG.md b/CHANGELOG.md index a9ed6c3..1fe4886 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,10 +18,14 @@ Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - "Scan image" button replaced with a floating action button at the bottom-right of the viewport, using a Material Symbols Outlined camera glyph (`photo_camera`) for consistent rendering across platforms (was a small text button in the input pane header). - Crop modal: - No default crop box. User drags on the image to draw the region; falls back to full image if they confirm without drawing. - - Rotate left / Rotate right / Reset / Use this buttons replaced with Material Symbols icons (`rotate_left`, `rotate_right`, `restart_alt`, `check`). Cancel kept as text. + - Buttons are now Material Symbols icons: `rotate_left`, `rotate_right`, `invert_colors` (new — see below), `check`. Cancel kept as text. The `check` (Use this) button is larger and more prominent. The Reset button was removed (rarely useful with no default box). - Inner padding bumped to 2 rem so cropperjs's corner handles never sit on the right/bottom edges where Android's edge-swipe back gesture fires. iOS safe-area insets honoured on the backdrop and FAB. - Header text is now a hint ("Drag on the image to select the text region") instead of a title. +### Added +- Camera viewfinder modal on mobile (via `navigator.mediaDevices.getUserMedia` with `facingMode: environment`) — replaces the `` flow. Tapping the shutter goes directly to the crop modal, skipping the OS-level "retake / use" confirm step. Falls back to the file picker if camera access is denied or unavailable; a "Pick from file" icon (`photo_library`) inside the camera modal also routes to the picker on demand. +- Invert-colours toggle (`invert_colors`) in the crop modal. Tap to flip light-on-dark text into the dark-on-light polarity Tesseract expects. The grayscale buffer is inverted before adaptive thresholding so the binarised output is correct. + ### Fixed - "Hot: …" status no longer claims "unloads in X" when the server's `keep_alive` is `-1` (Ollama returns an absurd year-4001 `expires_at`). Threshold: any expiry >7 days drops the suffix and just shows the model name. diff --git a/static/index.html b/static/index.html index 81b989d..cf3b714 100644 --- a/static/index.html +++ b/static/index.html @@ -269,13 +269,36 @@ .modal-btn .material-symbols-outlined { font-size: 20px; } .modal-btn.icon { padding: 0.35rem 0.55rem; min-width: 2.4rem; } .modal-btn:hover { border-color: var(--accent); color: var(--fg); } + .modal-btn.active { + background: var(--accent); + color: #fff; + border-color: var(--accent); + } .modal-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); } + .modal-btn.primary.icon { + padding: 0.55rem 1.1rem; + min-width: 3.2rem; + } + .modal-btn.primary.icon .material-symbols-outlined { font-size: 24px; } .modal-btn.primary:hover { color: #fff; } + /* Camera viewfinder modal */ + .cam-body { + display: flex; + align-items: center; + justify-content: center; + padding: 0 !important; + } + .cam-body video { + max-width: 100%; + max-height: 70vh; + display: block; + } + /* CodeMirror editor host — matches .output styling so input & output align */ .cm-editor { min-height: 180px; @@ -330,7 +353,7 @@