re-organize project structure a bit + add icons

This commit is contained in:
Joeri Exelmans 2025-10-13 17:14:21 +02:00
parent 3cb3ef91d2
commit 5e7b944978
24 changed files with 514 additions and 249 deletions

13
src/App/util.ts Normal file
View file

@ -0,0 +1,13 @@
export function formatTime(timeMs: number) {
const leadingZeros = "00" + Math.floor(timeMs) % 1000;
const formatted = `${Math.floor(timeMs / 1000)}.${(leadingZeros).substring(leadingZeros.length-3)}`;
return formatted;
}
export function compactTime(timeMs: number) {
if (timeMs % 1000 === 0) {
return `${timeMs / 1000}s`;
}
return `${timeMs} ms`;
}