mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix contest first display
This commit is contained in:
1 parent
9716e7caa2
commit
90283a3944
2 files changed
+8
-13
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.36.9",
|
"version": "2.36.10",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -241,24 +241,20 @@ const oi: ContestRule = {
|
|||||||
const index = pid.toString().includes(':')
|
const index = pid.toString().includes(':')
|
||||||
? `${tsdoc.uid}/${pid.toString().replace(':', '/')}`
|
? `${tsdoc.uid}/${pid.toString().replace(':', '/')}`
|
||||||
: `${tsdoc.uid}/${tdoc.domainId}/${pid}`;
|
: `${tsdoc.uid}/${tdoc.domainId}/${pid}`;
|
||||||
|
const node: ScoreboardNode =
|
||||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||||
if (isDone(tdoc) && tsddict[pid]?.rid?.toHexString() !== psdict[index]?.rid?.toHexString()) {
|
isDone(tdoc) && tsddict[pid]?.rid?.toHexString() !== psdict[index]?.rid?.toHexString()
|
||||||
row.push({
|
? {
|
||||||
type: 'records',
|
type: 'records',
|
||||||
value: '',
|
value: '',
|
||||||
raw: [
|
raw: [{
|
||||||
{
|
|
||||||
value: tsddict[pid]?.score ?? '-',
|
value: tsddict[pid]?.score ?? '-',
|
||||||
raw: tsddict[pid]?.rid || null,
|
raw: tsddict[pid]?.rid || null,
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
value: psdict[index]?.score ?? '-',
|
value: psdict[index]?.score ?? '-',
|
||||||
raw: psdict[index]?.rid ?? null,
|
raw: psdict[index]?.rid ?? null,
|
||||||
},
|
}],
|
||||||
],
|
} : {
|
||||||
});
|
|
||||||
} else {
|
|
||||||
const node: ScoreboardNode = {
|
|
||||||
type: 'record',
|
type: 'record',
|
||||||
value: tsddict[pid]?.score ?? '-',
|
value: tsddict[pid]?.score ?? '-',
|
||||||
raw: tsddict[pid]?.rid || null,
|
raw: tsddict[pid]?.rid || null,
|
||||||
@@ -268,7 +264,6 @@ const oi: ContestRule = {
|
|||||||
}
|
}
|
||||||
row.push(node);
|
row.push(node);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
rows.push(row);
|
rows.push(row);
|
||||||
}
|
}
|
||||||
return [rows, udict, nPages];
|
return [rows, udict, nPages];
|
||||||
|
|||||||
Reference in new issue
Block a user