mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: 修复设置中无法取消选中checkbox的问题
This commit is contained in:
1 parent
7a41fecb0e
commit
a81d514b10
11 files changed
+29
-21
No files matched your search
+5
-5
@@ -23,10 +23,10 @@
|
|||||||
"@types/jest": "^26.0.20",
|
"@types/jest": "^26.0.20",
|
||||||
"@types/node": "^14.14.31",
|
"@types/node": "^14.14.31",
|
||||||
"@types/semver": "^7.3.4",
|
"@types/semver": "^7.3.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.15.2",
|
"@typescript-eslint/eslint-plugin": "^4.16.1",
|
||||||
"@typescript-eslint/parser": "^4.15.2",
|
"@typescript-eslint/parser": "^4.16.1",
|
||||||
"cross-spawn": "^7.0.3",
|
"cross-spawn": "^7.0.3",
|
||||||
"eslint": "^7.20.0",
|
"eslint": "^7.21.0",
|
||||||
"eslint-config-airbnb-typescript": "^12.0.0",
|
"eslint-config-airbnb-typescript": "^12.0.0",
|
||||||
"eslint-import-resolver-typescript": "^2.4.0",
|
"eslint-import-resolver-typescript": "^2.4.0",
|
||||||
"eslint-plugin-import": "^2.22.1",
|
"eslint-plugin-import": "^2.22.1",
|
||||||
@@ -35,8 +35,8 @@
|
|||||||
"latest-version": "^5.1.0",
|
"latest-version": "^5.1.0",
|
||||||
"ora": "^5.3.0",
|
"ora": "^5.3.0",
|
||||||
"semver": "^7.3.4",
|
"semver": "^7.3.4",
|
||||||
"ts-jest": "^26.5.2",
|
"ts-jest": "^26.5.3",
|
||||||
"typescript": "4.2.2"
|
"typescript": "4.2.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": "^9.1.0",
|
"fs-extra": "^9.1.0",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/xml2js": "^0.4.8",
|
"@types/xml2js": "^0.4.8",
|
||||||
"bson": "^4.2.2"
|
"bson": "^4.2.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"hydrooj": "^2.20.0"
|
"hydrooj": "^2.20.0"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/hydrojudge",
|
"name": "@hydrooj/hydrojudge",
|
||||||
"bin": "bin/hydrojudge.js",
|
"bin": "bin/hydrojudge.js",
|
||||||
"version": "2.4.6",
|
"version": "2.4.7",
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
],
|
],
|
||||||
@@ -11,14 +11,14 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"adm-zip": "^0.5.3",
|
"adm-zip": "^0.5.3",
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
"bson": "^4.2.2",
|
"bson": "^4.2.3",
|
||||||
"fs-extra": "^9.1.0",
|
"fs-extra": "^9.1.0",
|
||||||
"js-yaml": "^4.0.0",
|
"js-yaml": "^4.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"p-queue": "^6.6.1",
|
"p-queue": "^6.6.1",
|
||||||
"shell-quote": "^1.7.2",
|
"shell-quote": "^1.7.2",
|
||||||
"systeminformation": "5.3.3",
|
"systeminformation": "5.3.3",
|
||||||
"ws": "^7.4.3",
|
"ws": "^7.4.4",
|
||||||
"yargs": "^16.2.0"
|
"yargs": "^16.2.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bson": "^4.0.2",
|
"@types/bson": "^4.0.2",
|
||||||
"@types/fs-extra": "^9.0.7",
|
"@types/fs-extra": "^9.0.8",
|
||||||
"@types/js-yaml": "^4.0.0",
|
"@types/js-yaml": "^4.0.0",
|
||||||
"@types/shell-quote": "^1.7.0"
|
"@types/shell-quote": "^1.7.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -243,7 +243,6 @@ export default class Hydro {
|
|||||||
});
|
});
|
||||||
this.ws.on('message', (data) => {
|
this.ws.on('message', (data) => {
|
||||||
const request = JSON.parse(data.toString());
|
const request = JSON.parse(data.toString());
|
||||||
console.log(request);
|
|
||||||
if (request.task) queue.push(new JudgeTask(this, request.task, this.ws));
|
if (request.task) queue.push(new JudgeTask(this, request.task, this.ws));
|
||||||
});
|
});
|
||||||
this.ws.on('close', (data, reason) => {
|
this.ws.on('close', (data, reason) => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.20.0",
|
"version": "2.20.1",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"minio": "7.0.17",
|
"minio": "7.0.17",
|
||||||
"moment-timezone": "^0.5.32",
|
"moment-timezone": "^0.5.32",
|
||||||
"mongodb": "^3.6.4",
|
"mongodb": "^3.6.4",
|
||||||
"nodemailer": "^6.4.18",
|
"nodemailer": "^6.5.0",
|
||||||
"p-queue": "^6.6.2",
|
"p-queue": "^6.6.2",
|
||||||
"serialize-javascript": "^5.0.1",
|
"serialize-javascript": "^5.0.1",
|
||||||
"sockjs": "^0.3.20",
|
"sockjs": "^0.3.20",
|
||||||
@@ -39,16 +39,16 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/adm-zip": "^0.4.33",
|
"@types/adm-zip": "^0.4.33",
|
||||||
"@types/fs-extra": "^9.0.7",
|
"@types/fs-extra": "^9.0.8",
|
||||||
"@types/inquirer": "^7.3.1",
|
"@types/inquirer": "^7.3.1",
|
||||||
"@types/js-yaml": "^4.0.0",
|
"@types/js-yaml": "^4.0.0",
|
||||||
"@types/koa": "^2.13.0",
|
"@types/koa": "^2.13.1",
|
||||||
"@types/koa-router": "^7.4.1",
|
"@types/koa-router": "^7.4.1",
|
||||||
"@types/koa-static-cache": "^5.1.0",
|
"@types/koa-static-cache": "^5.1.0",
|
||||||
"@types/lodash": "^4.14.168",
|
"@types/lodash": "^4.14.168",
|
||||||
"@types/lru-cache": "^5.1.0",
|
"@types/lru-cache": "^5.1.0",
|
||||||
"@types/minio": "^7.0.7",
|
"@types/minio": "^7.0.7",
|
||||||
"@types/mongodb": "^3.6.8",
|
"@types/mongodb": "^3.6.9",
|
||||||
"@types/nodemailer": "^6.4.0",
|
"@types/nodemailer": "^6.4.0",
|
||||||
"@types/serialize-javascript": "^5.0.0",
|
"@types/serialize-javascript": "^5.0.0",
|
||||||
"@types/sockjs": "^0.3.32",
|
"@types/sockjs": "^0.3.32",
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ class JudgeConnectionHandler extends ConnectionHandler {
|
|||||||
async cleanup() {
|
async cleanup() {
|
||||||
if (this.processing) {
|
if (this.processing) {
|
||||||
await record.reset(this.processing.domainId, this.processing.rid, false);
|
await record.reset(this.processing.domainId, this.processing.rid, false);
|
||||||
task.add(this.processing);
|
await task.add(this.processing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,6 +144,8 @@ class SystemSettingHandler extends SystemHandler {
|
|||||||
|
|
||||||
async post(args: any) {
|
async post(args: any) {
|
||||||
const tasks = [];
|
const tasks = [];
|
||||||
|
const booleanKeys = args.booleanKeys || {};
|
||||||
|
delete args.booleanKeys;
|
||||||
for (const key in args) {
|
for (const key in args) {
|
||||||
if (typeof args[key] === 'object') {
|
if (typeof args[key] === 'object') {
|
||||||
for (const subkey in args[key]) {
|
for (const subkey in args[key]) {
|
||||||
@@ -154,6 +156,13 @@ class SystemSettingHandler extends SystemHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (const key in booleanKeys) {
|
||||||
|
if (typeof booleanKeys[key] === 'object') {
|
||||||
|
for (const subkey in booleanKeys[key]) {
|
||||||
|
if (!args[key][subkey]) tasks.push(system.set(`${key}.${subkey}`, false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
tasks.push(bus.parallel('system/setting', args));
|
tasks.push(bus.parallel('system/setting', args));
|
||||||
await Promise.all(tasks);
|
await Promise.all(tasks);
|
||||||
this.back();
|
this.back();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"fs-extra": "^9.1.0"
|
"fs-extra": "^9.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"bson": "^4.2.2"
|
"bson": "^4.2.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"hydrooj": "^2.15.0"
|
"hydrooj": "^2.15.0"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"hydrooj": "^2.15.0"
|
"hydrooj": "^2.15.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ws": "^7.4.3"
|
"ws": "^7.4.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/ws": "^7.4.0"
|
"@types/ws": "^7.4.0"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"build": "tsc"
|
"build": "tsc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/mysql": "^2.15.17"
|
"@types/mysql": "^2.15.18"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"hydrooj": "^2.14.0"
|
"hydrooj": "^2.14.0"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"build": "tsc"
|
"build": "tsc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/mongodb": "^3.6.8"
|
"@types/mongodb": "^3.6.9"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"hydrooj": "^2.17.22"
|
"hydrooj": "^2.17.22"
|
||||||
|
|||||||
Reference in new issue
Block a user