From fbd4b836f7e4f448f0be162e79cd89ec053183ba Mon Sep 17 00:00:00 2001 From: bruno Date: Mon, 20 Jul 2026 21:39:40 -0400 Subject: [PATCH] fix: /local-workspace SVG rendering + ALL emoji icons converted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - BUG: x-textβ†’x-html pour _fileIcon() (SVG s'affichait en texte brut) - _fileIcon(): 11 types de fichiers β†’ SVG (πŸπŸ“•πŸ–ΌοΈπŸ“œπŸŒπŸŽ¨πŸ—ƒοΈπŸ’»βš‘πŸ“¦πŸ“„) - title-card: x-text 'πŸ“' β†’ x-html getSvgIcon('folder',24) - preview empty states (PDF): πŸ“• β†’ getSvgIcon('file') - toolbar: πŸ”πŸ“„πŸ“πŸ—‘ β†’ SVG icons - filter chips: πŸ“πŸ“πŸ“•πŸ–ΌοΈπŸ“œ β†’ getSvgIcon() - view menu: πŸŒ³πŸ“‹πŸ“ŠπŸ·οΈπŸ“ β†’ text-only (clean) - _icons.html: +image, +download - getSvgIcon JS: +image, +download, +search, +home - 143 tests passent --- app/templates/_icons.html | 4 ++ app/templates/base.html | 6 ++- app/templates/local_workspace.html | 84 +++++++++++++++--------------- 3 files changed, 51 insertions(+), 43 deletions(-) diff --git a/app/templates/_icons.html b/app/templates/_icons.html index 3751564..846e203 100644 --- a/app/templates/_icons.html +++ b/app/templates/_icons.html @@ -48,6 +48,10 @@ {%- elif name == 'bell' -%} +{%- elif name == 'image' -%} + +{%- elif name == 'download' -%} + {%- elif name == 'chevron-down' -%} {%- elif name == 'inbox' -%} diff --git a/app/templates/base.html b/app/templates/base.html index 2956bce..3c49c81 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -605,7 +605,11 @@ folder: '', file: '', star: '', - trash: '' + trash: '', + image: '', + download: '', + search: '', + home: '' }; return svgs[name] || ''; } diff --git a/app/templates/local_workspace.html b/app/templates/local_workspace.html index 459c12c..b031e23 100644 --- a/app/templates/local_workspace.html +++ b/app/templates/local_workspace.html @@ -697,7 +697,7 @@ window._wsInitData = (function() { // PDF preview if (/\.pdf$/.test(name)) { this.previewPanelContent = '
' - + 'πŸ“•' + + ''+getSvgIcon('file',32)+'' + '
' + this._escHtml(node.name) + '
' + '
' + (node.size_display || '') + '
' + 'Open in viewer' @@ -1394,7 +1394,7 @@ window._wsInitData = (function() { var html = ''; this.previewContent = html; this.previewCache[cacheKey] = html; } else if (isPdf) { - var html = '
πŸ“•
PDF Document
Open viewer β†’
'; + var html = '
'+getSvgIcon('file',48)+'
PDF Document
Open viewer β†’
'; this.previewContent = html; this.previewCache[cacheKey] = html; } else { this.previewContent = 'Loading...'; @@ -1479,21 +1479,21 @@ window._wsInitData = (function() { // FlowDeck internal pages (no extension, blocks/markdown format) if (contentFormat && contentFormat !== 'file') return ''+getSvgIcon('edit',14)+''; var n = (name || '').toLowerCase(); - if (/\.(png|jpe?g|gif|webp|svg|bmp|ico)$/.test(n)) return 'πŸ–ΌοΈ'; - if (/\.pdf$/.test(n)) return 'πŸ“•'; + if (/\.(png|jpe?g|gif|webp|svg|bmp|ico)$/.test(n)) return ''+getSvgIcon('image',14)+''; + if (/\.pdf$/.test(n)) return ''+getSvgIcon('file',14)+''; if (/\.(md|markdown)$/.test(n)) return ''+getSvgIcon('edit',14)+''; - if (/\.(py)$/.test(n)) return '🐍'; + if (/\.(py)$/.test(n)) return ''+getSvgIcon('file',14)+''; if (/\.(js|jsx|ts|tsx)$/.test(n)) return 'πŸ“œ'; - if (/\.(html?|xml)$/.test(n)) return '🌐'; - if (/\.css$/.test(n)) return '🎨'; + if (/\.(html?|xml)$/.test(n)) return ''+getSvgIcon('file',14)+''; + if (/\.css$/.test(n)) return ''+getSvgIcon('file',14)+''; if (/\.json$/.test(n)) return ''+getSvgIcon('file',14)+''; - if (/\.sql$/.test(n)) return 'πŸ—ƒοΈ'; - if (/\.(sh|bash|zsh)$/.test(n)) return 'πŸ’»'; - if (/\.ps1$/.test(n)) return '⚑'; + if (/\.sql$/.test(n)) return ''+getSvgIcon('file',14)+''; + if (/\.(sh|bash|zsh)$/.test(n)) return ''+getSvgIcon('file',14)+''; + if (/\.ps1$/.test(n)) return ''+getSvgIcon('file',14)+''; if (/\.(rs|go|java|rb|php|c|cpp|h|swift|kt|scala|r)$/.test(n)) return 'πŸ“œ'; if (/\.(txt|log)$/.test(n)) return ''+getSvgIcon('file',14)+''; - if (/\.(zip|tar|gz|rar|7z)$/.test(n)) return 'πŸ“¦'; - return 'πŸ“„'; + if (/\.(zip|tar|gz|rar|7z)$/.test(n)) return ''+getSvgIcon('file',14)+''; + return ''+getSvgIcon('file',14)+''; }, // ── Search / Filter ── @@ -2029,16 +2029,16 @@ window._wsInitData = (function() { }, _fileTypeLabel(name, contentFormat) { - if (contentFormat && contentFormat !== 'file') return 'πŸ“ Page'; + if (contentFormat && contentFormat !== 'file') return 'Page'; var n = (name || '').toLowerCase(); - if (/\.(png|jpe?g|gif|webp|svg|bmp|ico)$/.test(n)) return 'πŸ–ΌοΈ Image'; - if (/\.pdf$/.test(n)) return 'πŸ“• PDF'; - if (/\.(py|js|jsx|ts|tsx|rs|go|java|rb|php|c|cpp|h|swift|kt|scala|r|sh|bash|ps1|sql)$/.test(n)) return 'πŸ“œ Code'; - if (/\.(txt|md|markdown|log)$/.test(n)) return 'πŸ“„ Text'; - if (/\.(zip|tar|gz|rar|7z)$/.test(n)) return 'πŸ“¦ Archive'; - if (/\.(mp3|wav|ogg|flac|aac)$/.test(n)) return '🎡 Audio'; - if (/\.(mp4|webm|mov|avi)$/.test(n)) return '🎬 Video'; - return 'πŸ“„ File'; + if (/\.(png|jpe?g|gif|webp|svg|bmp|ico)$/.test(n)) return 'Image'; + if (/\.pdf$/.test(n)) return 'PDF'; + if (/\.(py|js|jsx|ts|tsx|rs|go|java|rb|php|c|cpp|h|swift|kt|scala|r|sh|bash|ps1|sql)$/.test(n)) return 'Code'; + if (/\.(txt|md|markdown|log)$/.test(n)) return 'Text'; + if (/\.(zip|tar|gz|rar|7z)$/.test(n)) return 'Archive'; + if (/\.(mp3|wav|ogg|flac|aac)$/.test(n)) return 'Audio'; + if (/\.(mp4|webm|mov|avi)$/.test(n)) return 'Video'; + return 'File'; }, selectAllFiltered(ev) { @@ -2161,15 +2161,15 @@ console.log('FLOWDECK v2.4.6 β€” IIFE done, _wsInitData keys:', Object.keys(wind β–Ύ
- - - - - + + + + +
- πŸ” + @@ -2184,14 +2184,14 @@ console.log('FLOWDECK v2.4.6 β€” IIFE done, _wsInitData keys:', Object.keys(wind - - + +
- +
@@ -2200,11 +2200,11 @@ console.log('FLOWDECK v2.4.6 β€” IIFE done, _wsInitData keys:', Object.keys(wind
- - - - - + + + + + βœ• clear
@@ -2247,7 +2247,7 @@ console.log('FLOWDECK v2.4.6 β€” IIFE done, _wsInitData keys:', Object.keys(wind - +