mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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/node": "^14.14.31",
|
||||
"@types/semver": "^7.3.4",
|
||||
"@typescript-eslint/eslint-plugin": "^4.15.2",
|
||||
"@typescript-eslint/parser": "^4.15.2",
|
||||
"@typescript-eslint/eslint-plugin": "^4.16.1",
|
||||
"@typescript-eslint/parser": "^4.16.1",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"eslint": "^7.20.0",
|
||||
"eslint": "^7.21.0",
|
||||
"eslint-config-airbnb-typescript": "^12.0.0",
|
||||
"eslint-import-resolver-typescript": "^2.4.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
@@ -35,8 +35,8 @@
|
||||
"latest-version": "^5.1.0",
|
||||
"ora": "^5.3.0",
|
||||
"semver": "^7.3.4",
|
||||
"ts-jest": "^26.5.2",
|
||||
"typescript": "4.2.2"
|
||||
"ts-jest": "^26.5.3",
|
||||
"typescript": "4.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"fs-extra": "^9.1.0",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/xml2js": "^0.4.8",
|
||||
"bson": "^4.2.2"
|
||||
"bson": "^4.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hydrooj": "^2.20.0"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@hydrooj/hydrojudge",
|
||||
"bin": "bin/hydrojudge.js",
|
||||
"version": "2.4.6",
|
||||
"version": "2.4.7",
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
@@ -11,14 +11,14 @@
|
||||
"dependencies": {
|
||||
"adm-zip": "^0.5.3",
|
||||
"axios": "^0.21.1",
|
||||
"bson": "^4.2.2",
|
||||
"bson": "^4.2.3",
|
||||
"fs-extra": "^9.1.0",
|
||||
"js-yaml": "^4.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"p-queue": "^6.6.1",
|
||||
"shell-quote": "^1.7.2",
|
||||
"systeminformation": "5.3.3",
|
||||
"ws": "^7.4.3",
|
||||
"ws": "^7.4.4",
|
||||
"yargs": "^16.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@@ -27,7 +27,7 @@
|
||||
"license": "AGPL-3.0-only",
|
||||
"devDependencies": {
|
||||
"@types/bson": "^4.0.2",
|
||||
"@types/fs-extra": "^9.0.7",
|
||||
"@types/fs-extra": "^9.0.8",
|
||||
"@types/js-yaml": "^4.0.0",
|
||||
"@types/shell-quote": "^1.7.0"
|
||||
},
|
||||
|
||||
@@ -243,7 +243,6 @@ export default class Hydro {
|
||||
});
|
||||
this.ws.on('message', (data) => {
|
||||
const request = JSON.parse(data.toString());
|
||||
console.log(request);
|
||||
if (request.task) queue.push(new JudgeTask(this, request.task, this.ws));
|
||||
});
|
||||
this.ws.on('close', (data, reason) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.20.0",
|
||||
"version": "2.20.1",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
@@ -28,7 +28,7 @@
|
||||
"minio": "7.0.17",
|
||||
"moment-timezone": "^0.5.32",
|
||||
"mongodb": "^3.6.4",
|
||||
"nodemailer": "^6.4.18",
|
||||
"nodemailer": "^6.5.0",
|
||||
"p-queue": "^6.6.2",
|
||||
"serialize-javascript": "^5.0.1",
|
||||
"sockjs": "^0.3.20",
|
||||
@@ -39,16 +39,16 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/adm-zip": "^0.4.33",
|
||||
"@types/fs-extra": "^9.0.7",
|
||||
"@types/fs-extra": "^9.0.8",
|
||||
"@types/inquirer": "^7.3.1",
|
||||
"@types/js-yaml": "^4.0.0",
|
||||
"@types/koa": "^2.13.0",
|
||||
"@types/koa": "^2.13.1",
|
||||
"@types/koa-router": "^7.4.1",
|
||||
"@types/koa-static-cache": "^5.1.0",
|
||||
"@types/lodash": "^4.14.168",
|
||||
"@types/lru-cache": "^5.1.0",
|
||||
"@types/minio": "^7.0.7",
|
||||
"@types/mongodb": "^3.6.8",
|
||||
"@types/mongodb": "^3.6.9",
|
||||
"@types/nodemailer": "^6.4.0",
|
||||
"@types/serialize-javascript": "^5.0.0",
|
||||
"@types/sockjs": "^0.3.32",
|
||||
|
||||
@@ -159,7 +159,7 @@ class JudgeConnectionHandler extends ConnectionHandler {
|
||||
async cleanup() {
|
||||
if (this.processing) {
|
||||
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) {
|
||||
const tasks = [];
|
||||
const booleanKeys = args.booleanKeys || {};
|
||||
delete args.booleanKeys;
|
||||
for (const key in args) {
|
||||
if (typeof args[key] === 'object') {
|
||||
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));
|
||||
await Promise.all(tasks);
|
||||
this.back();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"fs-extra": "^9.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bson": "^4.2.2"
|
||||
"bson": "^4.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hydrooj": "^2.15.0"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"hydrooj": "^2.15.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ws": "^7.4.3"
|
||||
"ws": "^7.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ws": "^7.4.0"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"build": "tsc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mysql": "^2.15.17"
|
||||
"@types/mysql": "^2.15.18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hydrooj": "^2.14.0"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"build": "tsc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mongodb": "^3.6.8"
|
||||
"@types/mongodb": "^3.6.9"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"hydrooj": "^2.17.22"
|
||||
|
||||
Reference in new issue
Block a user