Merge pull request #737 from michelheusschen/fix/merge-tool-file-selection

fix: show only selected files for merge tool
This commit is contained in:
Anthony Stirling 2024-01-28 20:22:45 +00:00 committed by GitHub
commit 07e9fcb6cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,11 +8,18 @@ document.getElementById("fileInput-input").addEventListener("change", function()
displayFiles(files);
});
/**
* @param {FileList} files
*/
function displayFiles(files) {
var list = document.getElementById("selectedFiles");
const list = document.getElementById("selectedFiles");
for (var i = 0; i < files.length; i++) {
var item = document.createElement("li");
while (list.firstChild) {
list.removeChild(list.firstChild);
}
for (let i = 0; i < files.length; i++) {
const item = document.createElement("li");
item.className = "list-group-item";
item.innerHTML = `
<div class="d-flex justify-content-between align-items-center w-100">