From 2062ba088971023e5c68352ed3f687e7bf94f5a6 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Sun, 25 Jan 2026 19:20:08 +0000
Subject: [PATCH] Refactor Upload Modal to use read-only storage status
Simplified the Upload Modal by removing inline storage configuration forms.
The modal now displays the active storage provider (read-only) or prompts the user
to configure storage via the Profile Modal if missing.
Changes:
- Refactored `js/ui/components/UploadModal.js` to consume stored credentials directly.
- Updated `components/upload-modal.html` to remove complex forms.
- Updated `tests/ui/uploadModal-integration.test.mjs` to match new UI structure.
- Removed race-prone logic for saving credentials within the upload flow.
---
components/upload-modal.html | 200 +----
js/ui/components/UploadModal.js | 921 ++++------------------
tests/ui/uploadModal-integration.test.mjs | 92 ++-
3 files changed, 240 insertions(+), 973 deletions(-)
diff --git a/components/upload-modal.html b/components/upload-modal.html
index c72e835b..c8026d5e 100644
--- a/components/upload-modal.html
+++ b/components/upload-modal.html
@@ -115,7 +115,7 @@
- Required for direct file uploads. - - Read the storage setup guide. - -
-Create a bucket with this exact name in Cloudflare R2.
-- The public URL where your files will be accessible. -
-Verification Failed
- - Check Provider Settings → - -- Configure a generic S3-compatible bucket for direct uploads. -
-- Warning: Browser-held keys are only safe for trusted operators. -
- -- The manifest must be produced externally. This app does not create or sign presigned URLs. -
- -+ Storage is not configured. +
+