Spaces:
Running
Running
Gaurav vashistha commited on
Commit ·
ca8cbc5
1
Parent(s): e1f623b
Bugfix: Wire up Browse Files button to hidden input
Browse files- dashboard.html +14 -0
dashboard.html
CHANGED
|
@@ -301,6 +301,20 @@
|
|
| 301 |
const copyBtn = document.getElementById('copyBtn');
|
| 302 |
const copyIcon = document.getElementById('copyIcon');
|
| 303 |
const downloadBtn = document.getElementById('downloadBtn');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
let selectedFile = null;
|
| 305 |
let isCatalogGenerated = false;
|
| 306 |
const defaultDropZoneContent = `
|
|
|
|
| 301 |
const copyBtn = document.getElementById('copyBtn');
|
| 302 |
const copyIcon = document.getElementById('copyIcon');
|
| 303 |
const downloadBtn = document.getElementById('downloadBtn');
|
| 304 |
+
|
| 305 |
+
const browseBtn = document.getElementById('browseBtn');
|
| 306 |
+
browseBtn.addEventListener('click', (e) => {
|
| 307 |
+
e.preventDefault();
|
| 308 |
+
fileInput.click();
|
| 309 |
+
});
|
| 310 |
+
fileInput.addEventListener('change', () => {
|
| 311 |
+
if (fileInput.files.length > 0) {
|
| 312 |
+
// Provide a visual cue that a file was selected
|
| 313 |
+
const fileName = fileInput.files[0].name;
|
| 314 |
+
browseBtn.innerHTML = `<span class="material-symbols-outlined text-xl">check_circle</span> ${fileName}`;
|
| 315 |
+
}
|
| 316 |
+
});
|
| 317 |
+
|
| 318 |
let selectedFile = null;
|
| 319 |
let isCatalogGenerated = false;
|
| 320 |
const defaultDropZoneContent = `
|