From f87c52fda29d187022471e8c7e6c2fa8b9f91fc7 Mon Sep 17 00:00:00 2001 From: freedit-dev Date: Fri, 6 Sep 2024 07:36:15 +0800 Subject: [PATCH] refactor: do not show size for Dir (#447) --- assets/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/index.js b/assets/index.js index 2b51d2a..91d2cba 100644 --- a/assets/index.js +++ b/assets/index.js @@ -477,6 +477,8 @@ function addPath(file, index) { ${actionDelete} ${actionEdit} `; + + let sizeDisplay = isDir ? "" : formatSize(file.size).join(" "); $pathsTableBody.insertAdjacentHTML("beforeend", ` @@ -487,7 +489,7 @@ function addPath(file, index) { ${encodedName} ${formatMtime(file.mtime)} - ${formatSize(file.size).join(" ")} + ${sizeDisplay} ${actionCell} `); }