mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: 在线IDE中显示历史提交
This commit is contained in:
1 parent
5cae54ed0a
commit
5153a7a871
8 files changed
+6
-70
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.28.42",
|
||||
"version": "2.28.43",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -321,15 +321,7 @@ export class ContestDetailProblemSubmitHandler extends ContestProblemHandler {
|
||||
|
||||
@param('tid', Types.ObjectID)
|
||||
@param('pid', Types.Name)
|
||||
async get(domainId: string, tid: ObjectID, _pid: string) {
|
||||
const pid = this.tdoc.pids[parseInt(_pid, 36) - 10];
|
||||
this.response.body.rdocs = [];
|
||||
if (contest.canShowRecord.call(this, this.tdoc)) {
|
||||
this.response.body.rdocs = await record.getUserInProblemMulti(
|
||||
domainId, this.user._id,
|
||||
pid, { type: document.TYPE_CONTEST, tid },
|
||||
).sort({ _id: -1 }).limit(10).toArray();
|
||||
}
|
||||
async get(domainId: string, tid: ObjectID, pid: string) {
|
||||
this.response.body.path = [
|
||||
['Hydro', 'homepage'],
|
||||
['contest_main', 'contest_main'],
|
||||
|
||||
@@ -197,12 +197,7 @@ class HomeworkDetailProblemSubmitHandler extends HomeworkDetailProblemHandler {
|
||||
|
||||
@param('tid', Types.ObjectID)
|
||||
@param('pid', Types.String)
|
||||
async get(domainId: string, tid: ObjectID, _pid: string) {
|
||||
const pid = this.tdoc.pids[parseInt(_pid, 36) - 10];
|
||||
this.response.body.rdocs = contest.canShowRecord.call(this, this.tdoc)
|
||||
? await record.getUserInProblemMulti(domainId, this.user._id, pid, { type: document.TYPE_HOMEWORK, tid })
|
||||
.sort('_id', -1).limit(10).toArray()
|
||||
: [];
|
||||
async get(domainId: string, tid: ObjectID, pid: string) {
|
||||
this.response.body.path = [
|
||||
['Hydro', 'homepage'],
|
||||
['homework_main', 'homework_main'],
|
||||
|
||||
@@ -248,11 +248,6 @@ export class ProblemSubmitHandler extends ProblemDetailHandler {
|
||||
@param('pid', Types.Name, null, parsePid)
|
||||
async get(domainId: string, pid: string | number) {
|
||||
this.response.template = 'problem_submit.html';
|
||||
const rdocs = await record
|
||||
.getUserInProblemMulti(domainId, this.user._id, pid)
|
||||
.sort({ _id: -1 })
|
||||
.limit(10)
|
||||
.toArray();
|
||||
this.response.body = {
|
||||
path: [
|
||||
['Hydro', 'homepage'],
|
||||
@@ -262,7 +257,6 @@ export class ProblemSubmitHandler extends ProblemDetailHandler {
|
||||
],
|
||||
pdoc: this.pdoc,
|
||||
udoc: this.udoc,
|
||||
rdocs,
|
||||
title: this.pdoc.title,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user