mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: 比赛时自动隐藏题目标签
This commit is contained in:
1 parent
2b52930e9a
commit
2cc2c88b8a
7 files changed
+21
-12
No files matched your search
@@ -48,7 +48,14 @@ if (!cluster.isMaster) {
|
||||
const arg1 = argv.args[1];
|
||||
const arg2 = argv.args[2];
|
||||
if (operation === 'addon') {
|
||||
if (arg1 === 'add') addons.push(arg2);
|
||||
if (arg1 === 'create') {
|
||||
fs.mkdirSync('/root/addon');
|
||||
child.execSync('yarn init -y', { cwd: '/root/addon' });
|
||||
fs.mkdirSync('/root/addon/templates');
|
||||
fs.mkdirSync('/root/addon/locales');
|
||||
fs.mkdirSync('/root/addon/public');
|
||||
addons.push('/root/addon');
|
||||
} else if (arg1 === 'add') addons.push(arg2);
|
||||
else if (arg1 === 'remove') {
|
||||
for (let i = 0; i < addons.length; i++) {
|
||||
if (addons[i] === arg2) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.28.24",
|
||||
"version": "2.28.25",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -76,6 +76,7 @@ export class ContestDetailHandler extends Handler {
|
||||
];
|
||||
const index = tdoc.pids.map((i) => i.toString());
|
||||
for (const key in pdict) {
|
||||
pdict[key].tag.length = 0;
|
||||
const i = (index.indexOf(key) + 10).toString(36).toUpperCase();
|
||||
if (i !== '9') pdict[key].pid = i;
|
||||
}
|
||||
@@ -265,6 +266,7 @@ export class ContestProblemHandler extends Handler {
|
||||
]);
|
||||
if (!this.pdoc) throw new ProblemNotFoundError(domainId, pid);
|
||||
this.pdoc.pid = _pid;
|
||||
this.pdoc.tag.length = 0;
|
||||
// @ts-ignore
|
||||
if (this.pdoc.domainId !== domainId) this.pdoc.docId = `${this.pdoc.domainId}:${this.pdoc.docId}`;
|
||||
this.attended = this.tsdoc && this.tsdoc.attend === 1;
|
||||
|
||||
Reference in new issue
Block a user