From: freedit-dev Date: Thu, 5 Sep 2024 23:36:15 +0000 (+0800) Subject: refactor: do not show size for Dir (#447) X-Git-Url: https://git.ozva.co.uk/?a=commitdiff_plain;h=f87c52fda29d187022471e8c7e6c2fa8b9f91fc7;p=ozva-cloud refactor: do not show size for Dir (#447) --- 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} `); }