ui aanpassing, debug scherm weg

This commit is contained in:
kodi
2026-03-08 09:18:20 +01:00
parent e10082e1bc
commit d7f97b2a77
7 changed files with 66 additions and 34 deletions
+6 -3
View File
@@ -39,7 +39,6 @@
fileDownBtn: document.getElementById("fileDownBtn"),
fileRemoveBtn: document.getElementById("fileRemoveBtn"),
selectedFilesList: document.getElementById("selectedFilesList"),
filenamePreviewBtn: document.getElementById("filenamePreviewBtn"),
renameExecuteBtn: document.getElementById("renameExecuteBtn"),
fileModal: document.getElementById("fileModal"),
fileModalTitle: document.getElementById("fileModalTitle"),
@@ -85,7 +84,12 @@
}
function out(label, payload) {
el.outputBox.textContent = `${label}\n${JSON.stringify(payload, null, 2)}`;
const text = `${label}\n${JSON.stringify(payload, null, 2)}`;
if (el.outputBox) {
el.outputBox.textContent = text;
return;
}
console.log(text);
}
function makeBtn(label, handler, secondary) {
@@ -478,7 +482,6 @@
el.fileDownBtn.addEventListener("click", () => withHandler(() => reorderSelectedFiles(1), el.fileDownBtn));
el.fileRemoveBtn.addEventListener("click", () => withHandler(removeSelectedFile, el.fileRemoveBtn));
el.filenamePreviewBtn.addEventListener("click", () => withHandler(async () => out("Filename preview", await api(q("/api/session/filename-preview"))), el.filenamePreviewBtn));
el.renameExecuteBtn.addEventListener("click", () => withHandler(executeRename, el.renameExecuteBtn));
el.closeFileModalBtn.addEventListener("click", closeFileModal);