mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
ui: highlight upcoming and current contest
This commit is contained in:
1 parent
fb19c8073f
commit
81076b4899
7 files changed
+19
-8
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.39.12",
|
||||
"version": "2.39.13",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -527,7 +527,7 @@ export function isNew(tdoc: Tdoc, days = 1) {
|
||||
return (now < readyAt - days * 24 * 3600 * 1000);
|
||||
}
|
||||
|
||||
export function isUpcoming(tdoc: Tdoc, days = 1) {
|
||||
export function isUpcoming(tdoc: Tdoc, days = 7) {
|
||||
const now = new Date().getTime();
|
||||
const readyAt = tdoc.beginAt.getTime();
|
||||
return (now > readyAt - days * 24 * 3600 * 1000 && now < tdoc.beginAt.getTime());
|
||||
|
||||
Reference in new issue
Block a user