diff --git a/assets/index.js b/assets/index.js index 320c7d4..788d688 100644 --- a/assets/index.js +++ b/assets/index.js @@ -2,7 +2,6 @@ * @typedef {object} PathItem * @property {"Dir"|"SymlinkDir"|"File"|"SymlinkFile"} path_type * @property {boolean} is_symlink - * @property {string} base_name * @property {string} name * @property {number} mtime * @property {number} size @@ -152,7 +151,7 @@ function addPath(file, index) { $pathsTableBody.insertAdjacentHTML("beforeend", ` -
${getSvg(file)}
+
${getSvg(file.path_type)}
${file.name} ${formatMtime(file.mtime)} @@ -235,13 +234,8 @@ function getUrl(name) { return url; } -/** - * Get svg icon - * @param {PathItem} file - * @returns - */ -function getSvg(file) { - switch (file.path_type) { +function getSvg(path_type) { + switch (path_type) { case "Dir": return ``; case "File":