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.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-09 03:12:17 +00:00
1 parent 44aed00b5e
commit 0826a16ee1
1 file changed
+8
+8
View File
@@ -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