mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 16:02:26 +00:00
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:
1 parent
44aed00b5e
commit
0826a16ee1
1 file changed
+8
@@ -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
|
||||
|
||||
Reference in new issue
Block a user