From 15ea7027df8fdde148a3ffdff8e4113427c351eb Mon Sep 17 00:00:00 2001 From: Pietro Campagnano Date: Fri, 1 May 2026 17:59:28 +0200 Subject: [PATCH] style: move file type badges into Type column (#1793) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary The file type was shown twice in the file browser table: as a bold badge in the **Name** column and as plain text in the **Type** column. **Before:** badge in Name column + redundant text in Type column **After:** badge lives exclusively in the Type column | | Before | After | |---|---|---| | Folder | Name: `📁 folder` **FOLDER** · Type: `Folder` | Name: `📁 folder` · Type: **FOLDER** | | EPUB | Name: `📗 book.epub` **EPUB** · Type: `EPUB` | Name: `📗 book.epub` · Type: **EPUB** | | Other | Name: `📄 file.txt` · Type: `TXT` | unchanged | ### Before Screenshot From 2026-04-30 22-07-59 ### After Screenshot From 2026-04-30 22-08-45 ## Changes - Removed `epub-badge` and `folder-badge` from the Name column - Moved badges into the Type column, replacing the redundant plain text - Non-EPUB files are unaffected (extension text remains in Type column) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 --- src/network/html/FilesPage.html | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/network/html/FilesPage.html b/src/network/html/FilesPage.html index e39ff6fa..288a6a07 100644 --- a/src/network/html/FilesPage.html +++ b/src/network/html/FilesPage.html @@ -247,7 +247,6 @@ color: white; border-radius: 10px; font-size: 0.75em; - margin-left: 8px; } .folder-badge { display: inline-block; @@ -256,7 +255,6 @@ color: white; border-radius: 10px; font-size: 0.75em; - margin-left: 8px; } .file-icon { margin-right: 8px; @@ -1262,7 +1260,6 @@ .folder-badge { padding: 2px 5px; font-size: 0.65em; - margin-left: 4px; } .contents-header { margin-bottom: 8px; @@ -1913,8 +1910,8 @@ // Checkbox cell + folder row fileTableContent += ``; fileTableContent += ``; - fileTableContent += `📁${escapeHtml(file.name)}FOLDER`; - fileTableContent += 'Folder'; + fileTableContent += `📁${escapeHtml(file.name)}`; + fileTableContent += 'FOLDER'; fileTableContent += '-'; fileTableContent += `
`; fileTableContent += ''; @@ -1928,9 +1925,8 @@ fileTableContent += ``; fileTableContent += `${file.isEpub ? '📗' : '📄'}`; fileTableContent += `${escapeHtml(file.name)}`; - if (file.isEpub) fileTableContent += 'EPUB'; fileTableContent += ''; - fileTableContent += `${file.name.split('.').pop().toUpperCase()}`; + fileTableContent += file.isEpub ? 'EPUB' : `${escapeHtml(file.name.split('.').pop().toUpperCase())}`; fileTableContent += `${formatFileSize(file.size)}`; fileTableContent += `
`; fileTableContent += ``;