Draw folder and file icons
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user