fix
All checks were successful
Docker Deploy / build-and-deploy (push) Successful in 21s

This commit is contained in:
sam
2026-02-06 11:47:09 +00:00
parent 1e78d99624
commit 5028a2439e

View File

@@ -150,11 +150,13 @@
if (parentPath === '') parentPath = '/'; if (parentPath === '') parentPath = '/';
const tr = document.createElement('tr'); const tr = document.createElement('tr');
tr.className = 'file-row';
tr.onclick = () => enterDir(parentPath);
tr.innerHTML = ` tr.innerHTML = `
<td></td>
<td class="icon-col"><i class="fa-solid fa-arrow-turn-up text-secondary"></i></td> <td class="icon-col"><i class="fa-solid fa-arrow-turn-up text-secondary"></i></td>
<td>..</td> <td>..</td>
<td></td> <td></td>
<td></td>
<td class="text-end"></td> <td class="text-end"></td>
`; `;
tbody.appendChild(tr); tbody.appendChild(tr);
@@ -193,18 +195,14 @@
// Row click should not trigger when clicking on interactive elements // Row click should not trigger when clicking on interactive elements
tr.addEventListener('click', (e) => { tr.addEventListener('click', (e) => {
if (e.target.matches('input, button, a, i')) return; // Ignore clicks on actions/checkboxes // Ignore clicks on actions, checkboxes, or links
if (e.target.closest('button, a, input')) return;
if (file.is_dir) { if (file.is_dir) {
enterDir(file.path); enterDir(file.path);
} }
}); });
// Make the text part of the cell clickable for directory navigation
const fileNameCell = tr.querySelector('.file-name-cell');
if(file.is_dir) {
fileNameCell.classList.add('file-row');
fileNameCell.onclick = () => enterDir(file.path);
}
tbody.appendChild(tr); tbody.appendChild(tr);
}); });
} }