From 49c6aaa249bba82e6efa45c80182d58cc05a7db0 Mon Sep 17 00:00:00 2001 From: Kieran Date: Tue, 22 Feb 2022 14:59:29 +0000 Subject: [PATCH] Truncate long filenames --- VoidCat/spa/src/Admin/FileList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VoidCat/spa/src/Admin/FileList.js b/VoidCat/spa/src/Admin/FileList.js index a4e4f2e..789c4a0 100644 --- a/VoidCat/spa/src/Admin/FileList.js +++ b/VoidCat/spa/src/Admin/FileList.js @@ -46,8 +46,8 @@ export function FileList(props) { return ( - {i.id.substring(0, 4)}... - {meta?.name} + {i.id.substring(0, 4)}.. + {meta?.name ? (meta?.name.length > 20 ? `${meta?.name.substring(0, 20)}..` : meta?.name) : null} {meta?.uploaded ? moment(meta?.uploaded).fromNow() : null} {meta?.size ? FormatBytes(meta?.size, 2) : null} {bw ? FormatBytes(bw.egress, 2) : null}