Commit Graph

3 Commits (166d86cf5887508513ccde729ee096b643015f23)

Author SHA1 Message Date
Dustin 15227125b9 ui: Request higher video resolution from camera
Apparently, you get 640x480 unless you ask for more?  Need to constrain
the viewer size, though, otherwise it massively overflows the page and
makes it impossible to see what you're taking a picture of.
2025-03-08 20:41:40 -06:00
Dustin 2050ebf088 ui: Move camera action buttons below image viewer
On mobile, the screen is too narrow to put the action buttons to the
right of the image viewer.
2025-03-08 20:12:20 -06:00
Dustin 837caecc3a js: Initial UI implementation
I've implemented the UI using TypeScript and Shoelace.  I originally
started with Pico CSS, but I didn't really like its visuals.  Since
capturing photos using the camera requires JavaScript, and that's
basically the entire point of this application, Shoelace's JavaScript
dependency (for WebComponents), is acceptable.

The photo capture uses the Media Capture Web API, which exposes the
camera directly as a video stream.  We capture a frame from this stream
and save it in a canvas, which we then pass to Cropper.js to let the
user select only the relevant portion of the picture containing the
receipt itself.
2025-03-08 11:11:42 -06:00