lots of changes

This commit is contained in:
NoLogicAlan committed 2026-05-16 20:30:56 +03:00
1 parent ba225c914a
commit 6fa8f3b540
20 files changed
+296 -144

No files matched your search

+3 -3
View File
@@ -210,8 +210,8 @@ export class Utils {
* @returns {string} Human readable size
*/
static formatBytes(bytes, decimals = 2) {
if (!bytes || bytes === 0) return "0 Bytes";
if (bytes < 0) return "Unknown";
if (bytes === 0) return "0 Bytes";
if (!bytes || bytes < 0 || !isFinite(bytes)) return "Unknown";
const k = 1024;
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB"];
@@ -453,7 +453,7 @@ export class Utils {
progress = this.clamp(current, 0, 1);
}
const position = Math.floor(progress * length);
const position = Math.min(Math.floor(progress * length), length - 1);
let bar = "";
for (let i = 0; i < length; i++) {