Spaces:
Running
Running
hide the order preview before user input the file
Browse files- index.html +3 -3
- script.js +1 -2
index.html
CHANGED
|
@@ -54,13 +54,13 @@
|
|
| 54 |
<i data-feather="refresh-cw" class="w-4 h-4 mr-1"></i> Refresh
|
| 55 |
</button>
|
| 56 |
</div>
|
| 57 |
-
<div id="preview-container" class="bg-gray-50 rounded-lg p-4 min-h-40 border border-gray-200">
|
| 58 |
<div id="empty-state" class="text-center py-10">
|
| 59 |
<i data-feather="file-text" class="w-10 h-10 mx-auto text-gray-400"></i>
|
| 60 |
<p class="mt-2 text-gray-500">No data to preview. Upload a file to see the preview.</p>
|
| 61 |
</div>
|
| 62 |
-
<div id="preview-content" class="
|
| 63 |
-
|
| 64 |
<thead id="preview-head" class="bg-gray-100">
|
| 65 |
<!-- Headers will be inserted here -->
|
| 66 |
</thead>
|
|
|
|
| 54 |
<i data-feather="refresh-cw" class="w-4 h-4 mr-1"></i> Refresh
|
| 55 |
</button>
|
| 56 |
</div>
|
| 57 |
+
<div id="preview-container" class="hidden bg-gray-50 rounded-lg p-4 min-h-40 border border-gray-200">
|
| 58 |
<div id="empty-state" class="text-center py-10">
|
| 59 |
<i data-feather="file-text" class="w-10 h-10 mx-auto text-gray-400"></i>
|
| 60 |
<p class="mt-2 text-gray-500">No data to preview. Upload a file to see the preview.</p>
|
| 61 |
</div>
|
| 62 |
+
<div id="preview-content" class="overflow-x-auto">
|
| 63 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 64 |
<thead id="preview-head" class="bg-gray-100">
|
| 65 |
<!-- Headers will be inserted here -->
|
| 66 |
</thead>
|
script.js
CHANGED
|
@@ -166,9 +166,8 @@ const dropzone = document.getElementById('dropzone');
|
|
| 166 |
}
|
| 167 |
function showPreview(data) {
|
| 168 |
emptyState.classList.add('hidden');
|
| 169 |
-
previewContent.classList.remove('hidden');
|
| 170 |
previewContainer.classList.remove('hidden');
|
| 171 |
-
|
| 172 |
// Clear previous preview
|
| 173 |
previewHead.innerHTML = '';
|
| 174 |
previewBody.innerHTML = '';
|
|
|
|
| 166 |
}
|
| 167 |
function showPreview(data) {
|
| 168 |
emptyState.classList.add('hidden');
|
|
|
|
| 169 |
previewContainer.classList.remove('hidden');
|
| 170 |
+
showPreviewLink.textContent = 'Hide Preview';
|
| 171 |
// Clear previous preview
|
| 172 |
previewHead.innerHTML = '';
|
| 173 |
previewBody.innerHTML = '';
|