From aaad450175c38dd228146fd81940e707023c8059 Mon Sep 17 00:00:00 2001 From: Damian Schneider Date: Tue, 18 Nov 2025 07:26:17 +0100 Subject: [PATCH] show minimum of 0.1KB for small files in file editor --- wled00/data/edit.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/data/edit.htm b/wled00/data/edit.htm index d25d3a47..f5ed204b 100644 --- a/wled00/data/edit.htm +++ b/wled00/data/edit.htm @@ -264,7 +264,7 @@ function createTree(element, editor){ leaf.textContent=name; var span = cE("span"); span.style.cssText = "font-size: 14px; color: #aaa; margin-left: 8px;"; - span.textContent = (size / 1024).toFixed(1) + "KB"; + span.textContent = Math.max(0.1, (size / 1024)).toFixed(1) + "KB"; // show size in KB, minimum 0.1 to not show 0KB for small files leaf.appendChild(span); leaf.onmouseover=function(){ leaf.style.background="#333"; }; leaf.onmouseout=function(){ leaf.style.background=""; };