feat(dashcam): show converting badge and date on mobile video rows
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
@@ -112,6 +112,18 @@
|
||||
mobileLabel.style.maxWidth = "5rem";
|
||||
mobileLabel.textContent = file.path.split("/").pop();
|
||||
preview.appendChild(mobileLabel);
|
||||
// Date shown only on mobile (desktop has its own column)
|
||||
const mobileMeta = document.createElement("div");
|
||||
mobileMeta.className = "dash-thumb-meta text-muted";
|
||||
mobileMeta.textContent = new Date(file.modified_at * 1000).toLocaleDateString(undefined, { month: 'short', day: 'numeric' });
|
||||
preview.appendChild(mobileMeta);
|
||||
// Converting badge shown on mobile inside thumbnail cell
|
||||
if (file.converting) {
|
||||
const mobileBadge = document.createElement("span");
|
||||
mobileBadge.className = "badge bg-info text-dark dash-thumb-converting mt-1";
|
||||
mobileBadge.innerHTML = '<i class="fas fa-spinner fa-spin"></i>';
|
||||
preview.appendChild(mobileBadge);
|
||||
}
|
||||
row.appendChild(preview);
|
||||
thumbnailObserver.observe(image);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user