add no files
This commit is contained in:
parent
e8272ecca0
commit
2f6a213e6d
@ -6,6 +6,7 @@ const mappings = new Map(JSON.parse(localStorage.getItem('mappings')) || []);
|
||||
let statusLine = document.getElementById('status');
|
||||
// store for when done with sorting TODO display
|
||||
let splash = document.getElementById('current-file').innerHTML;
|
||||
let noFiles = document.getElementById('file-list').innerHTML;
|
||||
|
||||
let history = [];
|
||||
|
||||
@ -87,6 +88,10 @@ function renderMoveButtons() {
|
||||
|
||||
function renderFileList() {
|
||||
const fileListDiv = document.getElementById('file-list');
|
||||
if (fileList.length == 0) {
|
||||
fileListDiv.innerHTML = noFiles;
|
||||
return;
|
||||
}
|
||||
fileListDiv.innerHTML = '';
|
||||
fileList.forEach(file => {
|
||||
const p = document.createElement('p');
|
||||
@ -95,7 +100,7 @@ function renderFileList() {
|
||||
classes += " selected-file-list-item";
|
||||
}
|
||||
p.setAttribute("class", classes)
|
||||
p.innerHTML = file;
|
||||
p.textContent = file;
|
||||
fileListDiv.appendChild(p);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user