Draw folder and file icons

This commit is contained in:
Mikei386
2026-06-23 08:57:55 +02:00
parent dde4236a91
commit 16a195befa
6 changed files with 78 additions and 17 deletions
+1 -1
View File
@@ -308,7 +308,7 @@ function renderFileTable(entries) {
function renderFileIcons(entries) {
const items = entries.map((entry) => `
<button type="button" class="file-row icon-item ${entry.path === state.selectedEntry?.path ? 'selected' : ''}" data-path="${escapeAttr(entry.path)}" data-type="${escapeAttr(entry.type)}">
<span class="file-icon ${escapeAttr(entry.type)}">${icons[entry.type] || 'Item'}</span>
<span class="file-icon ${escapeAttr(entry.type)}" aria-label="${escapeAttr(icons[entry.type] || 'Item')}"></span>
<span class="icon-name">${escapeHtml(entry.name)}</span>
<span class="icon-meta">${entry.type === 'file' ? formatBytes(entry.size) : entry.type}</span>
</button>