diff --git a/atlas/templates/atlas/new_uploads.html b/atlas/templates/atlas/new_uploads.html index 5909b62e..da663660 100644 --- a/atlas/templates/atlas/new_uploads.html +++ b/atlas/templates/atlas/new_uploads.html @@ -40,8 +40,11 @@
Uploaded
Duplicates
- +
+ Files + +
Failed
@@ -170,12 +173,32 @@ if (current_chunk + 1 == total_chunks) { $("#loading").hide(); + // If there are duplicates, open the details and highlight the series + if (window.duplicate_series.size > 0) { + $("#upload-results").attr("open", true); + $("#duplicate-series").closest("details").attr("open", true); + // Show a global alert for duplicate files + toastr.warning( + "Some duplicate files have been detected and not re-imported.", + "Duplicate Files Warning", + { + "closeButton": true, + "progressBar": true, + "positionClass": "toast-top-full-width", + "timeOut": 7000 + } + ); window.duplicate_series.forEach((element) => { - let item = document.createElement("a"); - item.href = element; - item.textContent = element; - $("#duplicate-series").append(item, "
"); + const wrapper = document.createElement("div"); + wrapper.className = "alert alert-warning duplicate-series-highlight"; + const link = document.createElement("a"); + link.href = element; + link.textContent = `Series exists: ${element}`; + link.target = "_blank"; + wrapper.appendChild(link); + $("#duplicate-series").append(wrapper); }); + }; //$("#duplicate-series").append([...window.duplicate_series].join("
")); alert("Uploading complete") }