From 3321a7cfdf426e7b1176f6ac469a99a4af84fafd Mon Sep 17 00:00:00 2001 From: Ty Balascio Date: Fri, 25 Sep 2026 07:54:15 -0700 Subject: [PATCH] fix(fe): crypto.randomUUID not in non-secure contexts (LAN http) -> newId() fallback The LAN dev URL (http://192.168.1.202) is not a secure context, so crypto.randomUUID is undefined and adding a photo threw 'TypeError: crypto.randomUUID is not a function'. Add newId() (randomUUID when available, else crypto.getRandomValues UUIDv4) and use it in draft() and PhotoImport. Verified in Chromium. --- frontend/src/capture/PhotoImport.svelte | 3 ++- frontend/src/lib/types.ts | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/frontend/src/capture/PhotoImport.svelte b/frontend/src/capture/PhotoImport.svelte index d97ba76..7c11e47 100644 --- a/frontend/src/capture/PhotoImport.svelte +++ b/frontend/src/capture/PhotoImport.svelte @@ -1,6 +1,7 @@