Some fixes

This commit is contained in:
jpirnay
2026-05-20 20:56:03 +02:00
parent d729201321
commit c5b8c55c04
13 changed files with 52 additions and 20 deletions
+1
View File
@@ -108,6 +108,7 @@
.nav-links {
margin: 20px 0;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
+1
View File
@@ -113,6 +113,7 @@
.nav-links {
margin: 20px 0;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
+1
View File
@@ -59,6 +59,7 @@
.nav-links {
margin: 20px 0;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.nav-links a {
+4 -2
View File
@@ -310,8 +310,10 @@
// seconds.
function formatEta(seconds) {
if (!seconds || seconds <= 0) return "—";
const h = Math.floor(seconds / 3600);
const m = Math.round((seconds % 3600) / 60);
let h = Math.floor(seconds / 3600);
let m = Math.round((seconds % 3600) / 60);
// Rounding can push m to 60 (e.g. 3570s → 0h 60m); carry into hours.
if (m === 60) { h += 1; m = 0; }
if (h > 0) return `${h}h ${String(m).padStart(2, "0")}m`;
if (m > 0) return `${m}m`;
return "<1m";