Add local dashcam video library

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Mathieu Moran
2026-08-09 19:04:47 -04:00
co-authored by Copilot
parent c57457b934
commit 3a981f5c6d
14 changed files with 659 additions and 29 deletions
+13
View File
@@ -1,6 +1,18 @@
(function () {
"use strict";
function formatBytes(bytes) {
if (bytes === 0) {
return "0 B";
}
const units = ["B", "KB", "MB", "GB", "TB"];
const unit = Math.min(
Math.floor(Math.log(bytes) / Math.log(1024)),
units.length - 1
);
return `${(bytes / (1024 ** unit)).toFixed(unit === 0 ? 0 : 1)} ${units[unit]}`;
}
function compareRows(left, right, key, direction) {
const leftValue = left.dataset[key] || "";
const rightValue = right.dataset[key] || "";
@@ -66,4 +78,5 @@
}
document.querySelectorAll("[data-data-list]").forEach(initializeList);
window.YarisUI = Object.assign(window.YarisUI || {}, { formatBytes });
}());