From a9215698f900f3702afed57df63172fa6c9ee380 Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 30 Jun 2025 16:38:13 +0800 Subject: [PATCH] ui: upgrade to blueprintjs6 --- framework/eslint-config/base.mjs | 3 +- framework/eslint-config/package.json | 8 ++-- framework/framework/package.json | 2 +- package.json | 6 +-- .../frontend/autocomplete/autocomplete.scss | 8 ++-- packages/components/package.json | 2 +- packages/hydrojudge/package.json | 2 +- packages/hydrojudge/src/judge/interactive.ts | 2 +- packages/hydrooj/package.json | 8 ++-- .../problemconfig/ProblemConfigTree.tsx | 4 +- .../components/problemconfig/ProblemType.tsx | 2 +- .../problemconfig/tree/AddTestcase.tsx | 4 +- .../problemconfig/tree/SubtaskSettings.tsx | 40 +++++++++---------- .../components/{upload.ts => upload.tsx} | 37 ++++++++++------- packages/ui-default/package.json | 4 +- .../ui-default/pages/problem_config.page.styl | 12 +++--- .../ui-default/templates/contest_detail.html | 14 +++---- .../ui-default/templates/problem_detail.html | 22 +++++----- packages/ui-default/theme/dark.styl | 8 ++-- packages/ui-next/package.json | 4 +- packages/utils/package.json | 2 +- 21 files changed, 101 insertions(+), 93 deletions(-) rename packages/ui-default/components/{upload.ts => upload.tsx} (71%) diff --git a/framework/eslint-config/base.mjs b/framework/eslint-config/base.mjs index eab17edb8..1385d33a5 100644 --- a/framework/eslint-config/base.mjs +++ b/framework/eslint-config/base.mjs @@ -92,7 +92,8 @@ export default defineConfig([ 'default-param-last': 'off', 'func-call-spacing': 'off', - '@stylistic/func-call-spacing': ['error', 'never'], + 'function-call-spacing': 'off', + '@stylistic/function-call-spacing': ['error', 'never'], indent: 'off', '@stylistic/indent': ['warn', 4, { diff --git a/framework/eslint-config/package.json b/framework/eslint-config/package.json index 7c5f5f187..3bb388b8e 100644 --- a/framework/eslint-config/package.json +++ b/framework/eslint-config/package.json @@ -5,11 +5,11 @@ "main": "base.mjs", "dependencies": { "@eslint-react/eslint-plugin": "^1.52.2", - "@eslint/compat": "^1.3.0", + "@eslint/compat": "^1.3.1", "@eslint/eslintrc": "^3.3.1", - "@stylistic/eslint-plugin": "^4.4.1", - "@typescript-eslint/eslint-plugin": "^8.34.1", - "@typescript-eslint/parser": "^8.34.1", + "@stylistic/eslint-plugin": "^5.1.0", + "@typescript-eslint/eslint-plugin": "^8.35.0", + "@typescript-eslint/parser": "^8.35.0", "eslint-config-airbnb": "^19.0.4", "eslint-plugin-de-morgan": "^1.3.0", "eslint-plugin-github": "^6.0.0", diff --git a/framework/framework/package.json b/framework/framework/package.json index 4742f5029..f3d7f9e1f 100644 --- a/framework/framework/package.json +++ b/framework/framework/package.json @@ -19,7 +19,7 @@ "saslprep": "^1.0.3", "schemastery": "^3.16.1", "shorty.js": "^1.0.1", - "ws": "^8.18.2" + "ws": "^8.18.3" }, "devDependencies": { "@types/fs-extra": "^11.0.4", diff --git a/package.json b/package.json index d2a728654..bace992d9 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,8 @@ "cross-env": "^7.0.3", "cross-spawn": "^7.0.6", "esbuild": "0.25.2", - "eslint": "^9.29.0", - "eslint-import-resolver-typescript": "^4.4.3", + "eslint": "^9.30.0", + "eslint-import-resolver-typescript": "^4.4.4", "eslint-import-resolver-webpack": "^0.13.10", "fs-extra": "^11.3.0", "globals": "^16.2.0", @@ -53,7 +53,7 @@ "mongodb-memory-server": "10.1.4", "nyc": "^17.1.0", "ora": "^8.2.0", - "oxlint": "^1.3.0", + "oxlint": "^1.4.0", "package-json": "^10.0.1", "semver": "^7.7.2", "simple-git": "^3.28.0", diff --git a/packages/components/frontend/autocomplete/autocomplete.scss b/packages/components/frontend/autocomplete/autocomplete.scss index c05c94436..8383271ff 100644 --- a/packages/components/frontend/autocomplete/autocomplete.scss +++ b/packages/components/frontend/autocomplete/autocomplete.scss @@ -76,7 +76,7 @@ text-overflow: ellipsis; } - &>span.bp5-icon>svg { + &>span.bp6-icon>svg { font-size: 12px; cursor: pointer; padding: 4px; @@ -104,7 +104,7 @@ flex-grow: 1; } - &>span.bp5-icon>svg { + &>span.bp6-icon>svg { color: transparent; } @@ -112,7 +112,7 @@ background-color: #fafafa; font-weight: 600; - &>span.bp5-icon>svg { + &>span.bp6-icon>svg { color: #1890ff; } } @@ -121,7 +121,7 @@ background-color: #e6f7ff; cursor: pointer; - &>span.bp5-icon>svg { + &>span.bp6-icon>svg { color: currentColor; } } diff --git a/packages/components/package.json b/packages/components/package.json index bb5838dbc..1152bd402 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -19,7 +19,7 @@ "devDependencies": { "@types/diff": "^8.0.0", "@types/js-yaml": "^4.0.9", - "@types/lodash": "^4.17.18", + "@types/lodash": "^4.17.19", "sass": "^1.89.2" }, "peerDependencies": { diff --git a/packages/hydrojudge/package.json b/packages/hydrojudge/package.json index 59d66d17b..e3f12d369 100644 --- a/packages/hydrojudge/package.json +++ b/packages/hydrojudge/package.json @@ -15,7 +15,7 @@ "semver": "^7.7.2", "shell-quote": "^1.8.3", "superagent": "^10.2.1", - "ws": "^8.18.2" + "ws": "^8.18.3" }, "preferUnplugged": true, "license": "AGPL-3.0-or-later", diff --git a/packages/hydrojudge/src/judge/interactive.ts b/packages/hydrojudge/src/judge/interactive.ts index 16929cbb9..0a6b01fbc 100644 --- a/packages/hydrojudge/src/judge/interactive.ts +++ b/packages/hydrojudge/src/judge/interactive.ts @@ -48,7 +48,7 @@ function judgeCase(c: NormalizedCase) { if (code < 32 && signalled) message = signals[code]; else message = { message: 'Your program returned {0}.', params: [code] }; } else { - const result = parse(resInteractor.stderr, c.score); + const result = parse(resInteractor.stderr, c.score, ctx.config.detail); status = result.status; score = result.score; message = result.message; diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index f58eff2da..bf2207368 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -41,7 +41,7 @@ "mongodb": "^6.17.0", "mongodb-uri": "^0.9.7", "nanoid": "^5.1.5", - "nodemailer": "^7.0.3", + "nodemailer": "^7.0.4", "notp": "^2.0.3", "p-queue": "^8.1.0", "sanitize-filename": "^1.6.3", @@ -52,7 +52,7 @@ "superagent": "^10.2.1", "tar": "6.2.1", "thirty-two": "^1.0.2", - "ua-parser-js": "^2.0.3" + "ua-parser-js": "^2.0.4" }, "devDependencies": { "@types/adm-zip": "^0.5.7", @@ -60,8 +60,8 @@ "@types/fs-extra": "^11.0.4", "@types/js-yaml": "^4.0.9", "@types/koa-static-cache": "^5.1.4", - "@types/lodash": "^4.17.18", - "@types/mime-types": "^2.1.4", + "@types/lodash": "^4.17.19", + "@types/mime-types": "^3.0.1", "@types/mongodb-uri": "^0.9.4", "@types/nodemailer": "^6.4.17", "@types/notp": "^2.0.5", diff --git a/packages/ui-default/components/problemconfig/ProblemConfigTree.tsx b/packages/ui-default/components/problemconfig/ProblemConfigTree.tsx index 31fd461f8..5544fc01c 100644 --- a/packages/ui-default/components/problemconfig/ProblemConfigTree.tsx +++ b/packages/ui-default/components/problemconfig/ProblemConfigTree.tsx @@ -127,7 +127,7 @@ export function SubtaskConfigTree() {