From 0826a16ee1bed76048e53e73a35345f23fe2dcaa Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 9 Jan 2026 03:12:17 +0000 Subject: [PATCH] Update UploadModal to toggle thumbnail browse button based on mode - Modified `js/ui/components/UploadModal.js` to hide the thumbnail browse button when in 'External Link' mode. - Ensured the browse button is visible when switching back to 'Upload File' mode. - Added logic to clear the thumbnail file input when resetting the form. --- js/ui/components/UploadModal.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/ui/components/UploadModal.js b/js/ui/components/UploadModal.js index 81a59654..dfebf21a 100644 --- a/js/ui/components/UploadModal.js +++ b/js/ui/components/UploadModal.js @@ -258,9 +258,17 @@ export class UploadModal { if (!this.hasValidR2Settings() && this.sourceSections.settings.classList.contains("hidden")) { this.toggles.storageSettings.click(); // Expand } + + if (this.toggles.browseThumbnail) { + this.toggles.browseThumbnail.classList.remove("hidden"); + } } else { this.sourceSections.upload.classList.add("hidden"); this.sourceSections.external.classList.remove("hidden"); + + if (this.toggles.browseThumbnail) { + this.toggles.browseThumbnail.classList.add("hidden"); + } } // Update Button Text