diff --git a/assets/js/ticket.js b/assets/js/ticket.js index 2124b5a..0b25941 100644 --- a/assets/js/ticket.js +++ b/assets/js/ticket.js @@ -827,7 +827,7 @@ function renderAttachments(attachments) {
- ${lt.escHtml(att.file_size_formatted || formatFileSize(att.file_size))} • ${lt.escHtml(uploaderName)} • ${uploadDate} + ${lt.escHtml(att.file_size_formatted || lt.bytes.format(att.file_size))} • ${lt.escHtml(uploaderName)} • ${uploadDate}
@@ -841,17 +841,6 @@ function renderAttachments(attachments) { container.innerHTML = html; } -function formatFileSize(bytes) { - if (bytes >= 1073741824) { - return (bytes / 1073741824).toFixed(2) + ' GB'; - } else if (bytes >= 1048576) { - return (bytes / 1048576).toFixed(2) + ' MB'; - } else if (bytes >= 1024) { - return (bytes / 1024).toFixed(2) + ' KB'; - } else { - return bytes + ' bytes'; - } -} function deleteAttachment(attachmentId) { showConfirmModal( diff --git a/views/DashboardView.php b/views/DashboardView.php index fd42bbe..f504fb1 100644 --- a/views/DashboardView.php +++ b/views/DashboardView.php @@ -183,14 +183,14 @@ $nonce = SecurityHeadersMiddleware::getNonce();
-
+
[ # ]
Open Tickets
-
+
[ ! ]
@@ -211,7 +211,7 @@ $nonce = SecurityHeadersMiddleware::getNonce();
Created Today
-
+
[ OK ]
@@ -385,7 +385,7 @@ $nonce = SecurityHeadersMiddleware::getNonce();
- +
@@ -838,6 +838,29 @@ $nonce = SecurityHeadersMiddleware::getNonce();