mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
ui: move limits display to sidebar
This commit is contained in:
1 parent
90443546c8
commit
5bd851028c
4 files changed
+20
-19
No files matched your search
@@ -6,7 +6,7 @@ import {
|
||||
SolutionNotFoundError, ProblemNotFoundError, BadRequestError,
|
||||
} from '../error';
|
||||
import {
|
||||
Pdoc, User, Rdoc, PathComponent,
|
||||
Pdoc, User, Rdoc, PathComponent, ProblemStatusDoc,
|
||||
} from '../interface';
|
||||
import paginate from '../lib/paginate';
|
||||
import { isPid } from '../lib/validator';
|
||||
@@ -157,8 +157,12 @@ export class ProblemRandomHandler extends ProblemHandler {
|
||||
}
|
||||
}
|
||||
|
||||
export interface PdocWithPsdoc extends Pdoc {
|
||||
psdoc?: ProblemStatusDoc
|
||||
}
|
||||
|
||||
export class ProblemDetailHandler extends ProblemHandler {
|
||||
pdoc: Pdoc;
|
||||
pdoc: PdocWithPsdoc;
|
||||
udoc: User;
|
||||
|
||||
@route('pid', Types.Name, true, null, parsePid)
|
||||
@@ -196,6 +200,9 @@ export class ProblemDetailHandler extends ProblemHandler {
|
||||
} catch (e) {
|
||||
this.response.body.pdoc.config = `Cannot parse: ${e.message}`;
|
||||
}
|
||||
if (this.pdoc.psdoc) {
|
||||
this.response.body.rdoc = await record.get(this.domainId, this.pdoc.psdoc.rid);
|
||||
}
|
||||
}
|
||||
|
||||
@param('pid', Types.UnsignedInt)
|
||||
|
||||
Reference in new issue
Block a user