mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
ui: update acm scoreboard display
This commit is contained in:
1 parent
9f796e7024
commit
3ec549ee9c
12 files changed
+86
-88
No files matched your search
@@ -305,13 +305,14 @@ function _digit2(number: number) {
|
||||
return number < 10 ? `0${number}` : number.toString();
|
||||
}
|
||||
|
||||
export function formatSeconds(_seconds: string | number = '0') {
|
||||
export function formatSeconds(_seconds: string | number = '0', showSeconds = true) {
|
||||
const seconds = +_seconds;
|
||||
return '{0}:{1}:{2}'.format(
|
||||
_digit2(Math.floor(seconds / 3600)),
|
||||
let res = '{0}:{1}'.format(
|
||||
showSeconds ? _digit2(Math.floor(seconds / 3600)) : Math.floor(seconds / 3600),
|
||||
_digit2(Math.floor((seconds % 3600) / 60)),
|
||||
_digit2(seconds % 60),
|
||||
);
|
||||
if (showSeconds) res += `:${_digit2(seconds % 60)}`;
|
||||
return res;
|
||||
}
|
||||
|
||||
export function changeErrorType(err: any, Err: any) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/utils",
|
||||
"version": "1.1.15",
|
||||
"version": "1.1.16",
|
||||
"description": "hydrooj utils",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user