mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
系统设置中自定义UI的支持
This commit is contained in:
1 parent
11368bc831
commit
1722fbfaca
21 files changed
+284
-140
No files matched your search
@@ -112,8 +112,8 @@ export async function update(
|
||||
return res.value;
|
||||
}
|
||||
|
||||
export function reset(domainId: string, rid: ObjectID) {
|
||||
return update(domainId, rid, {
|
||||
export function reset(domainId: string, rid: ObjectID, isRejudge: boolean) {
|
||||
const upd: any = {
|
||||
score: 0,
|
||||
status: STATUS.STATUS_WAITING,
|
||||
time: 0,
|
||||
@@ -123,8 +123,9 @@ export function reset(domainId: string, rid: ObjectID) {
|
||||
compilerTexts: [],
|
||||
judgeAt: null,
|
||||
judger: null,
|
||||
rejudged: true,
|
||||
});
|
||||
};
|
||||
if (isRejudge) upd.rejudged = true;
|
||||
return update(domainId, rid, upd);
|
||||
}
|
||||
|
||||
export function count(domainId: string, query: any) {
|
||||
@@ -176,7 +177,7 @@ export async function judge(domainId: string, rid: ObjectID) {
|
||||
}
|
||||
|
||||
export async function rejudge(domainId: string, rid: ObjectID) {
|
||||
await reset(domainId, rid);
|
||||
await reset(domainId, rid, true);
|
||||
const rdoc = await get(domainId, rid);
|
||||
const pdoc = await problem.get(domainId, rdoc.pid);
|
||||
await task.add({
|
||||
|
||||
Reference in new issue
Block a user