This commit is contained in:
Miodec 2022-02-23 13:45:52 +01:00
commit 124e842115

View file

@ -14,13 +14,14 @@ export function update(): void {
// let th = Math.floor(DB.getSnapshot().globalStats.time / 3600);
// let tm = Math.floor((DB.getSnapshot().globalStats.time % 3600) / 60);
// let ts = Math.floor((DB.getSnapshot().globalStats.time % 3600) % 60);
$(".pageAccount .globalTimeTyping .val").text(
Misc.secondsToString(
Math.round(snapshot.globalStats.time as number),
true,
true
)
);
const seconds = snapshot?.globalStats?.time ?? 0;
let string = "";
if (seconds === 0) {
string = "-";
} else {
string = Misc.secondsToString(seconds, true, true);
}
$(".pageAccount .globalTimeTyping .val").text(string);
}
if (snapshot.globalStats !== undefined) {