vypis zmenenych souborů

This commit is contained in:
2021-01-09 16:44:58 +01:00
parent 4696151eef
commit 641c58e419
4 changed files with 64 additions and 11 deletions

View File

@@ -147,6 +147,26 @@ class View {
var publish = document.getElementsByClassName("commitWrapper")[0];
publish.style.display = "grid";
let form = document.getElementById("formPublish");
if (changedFiles.length == 0 && localStorage.getItem("pushError") != "true") {
this.errorPublish("Žádné soubory nebyly změněny.");
form.style.display = "none";
} else {
form.style.removeProperty("display");
let ul = document.getElementById("edittedFiles");
for (let i = 0; i < ul.children.length; i++) {
ul.lastChild.remove();
}
for (let i = 0; i < changedFiles.length; i++) {
let li = document.createElement("li");
var text = document.createTextNode(changedFiles[i]);
li.appendChild(text);
ul.appendChild(li);
}
}
let gitMsg = document.getElementById("inputCommitMsg");
gitMsg.disabled = localStorage.getItem("pushError") == "true";
}