next #180

Merged
niggl merged 24 commits from next into dev 2023-05-01 12:55:20 +00:00
Showing only changes of commit 01b415d4cb - Show all commits

View File

@ -49,21 +49,15 @@
if (laptime == 0 || laptime == null) {
return $_("first-scan-of-the-day");
}
if (laptime < 60) {
return `${laptime}s`;
}
if (laptime < 3600) {
return `${Math.floor(laptime / 60)}min ${
laptime - Math.floor(laptime / 60) * 60
}s`;
}
return `${Math.floor(laptime / 3600)}h ${
laptime - Math.floor(laptime / 3600) * 3600
}min ${
laptime -
Math.floor(laptime / 3600) * 3600 -
Math.floor(laptime / 60) * 60
}`;
laptime = Number(laptime);
const h = Math.floor(laptime / 3600);
const m = Math.floor((laptime % 3600) / 60);
const s = Math.floor((laptime % 3600) % 60);
const hDisplay = h > 0 ? h + (h == 1 ? "h, " : "h, ") : "";
const mDisplay = m > 0 ? m + (m == 1 ? "min, " : "min, ") : "";
const sDisplay = s > 0 ? s + (s == 1 ? "s" : "s") : "";
return hDisplay + mDisplay + sDisplay;
}
const columns = [