codemirror, pclzip, other changes

This commit is contained in:
Ryan
2025-03-10 03:37:11 -04:00
committed by GitHub
parent 9d100a980e
commit e3e6ecf487
9 changed files with 5977 additions and 185 deletions

View File

@@ -35,27 +35,32 @@ export function updateFileActionButtons() {
const copyBtn = document.getElementById("copySelectedBtn");
const moveBtn = document.getElementById("moveSelectedBtn");
const deleteBtn = document.getElementById("deleteSelectedBtn");
const zipBtn = document.getElementById("downloadZipBtn");
// Hide the buttons and dropdown if no files exist.
if (fileCheckboxes.length === 0) {
copyBtn.style.display = "none";
moveBtn.style.display = "none";
deleteBtn.style.display = "none";
zipBtn.style.display = "none";
} else {
// Otherwise, show the buttons and dropdown.
copyBtn.style.display = "inline-block";
moveBtn.style.display = "inline-block";
deleteBtn.style.display = "inline-block";
zipBtn.style.display = "inline-block";
// Enable the buttons if at least one file is selected; otherwise disable.
if (selectedCheckboxes.length > 0) {
copyBtn.disabled = false;
moveBtn.disabled = false;
deleteBtn.disabled = false;
zipBtn.disabled = false;
} else {
copyBtn.disabled = true;
moveBtn.disabled = true;
deleteBtn.disabled = true;
zipBtn.disabled = true;
}
}
}
@@ -77,4 +82,4 @@ export function showToast(message, duration = 3000) {
toast.style.display = "none";
}, 500); // Wait for the opacity transition to finish.
}, duration);
}
}