bug fixes

This commit is contained in:
undefined committed 2025-12-11 00:17:27 +08:00
1 parent 5ba7e0016e
commit b9c6252755
13 files changed
+27 -25

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@
"@types/diff": "^8.0.0",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.17.21",
"sass": "^1.94.2"
"sass": "^1.95.1"
},
"peerDependencies": {
"react": "*",
+1 -1
View File
@@ -21,7 +21,7 @@
"@hydrooj/common": "workspace:^",
"@hydrooj/framework": "workspace:^",
"@hydrooj/utils": "workspace:^",
"@mongodb-js/saslprep": "^1.3.2",
"@mongodb-js/saslprep": "^1.4.0",
"@simplewebauthn/server": "13.2.2",
"@undefined-moe/require-resolve-hook": "^1.1.0",
"@zip.js/zip.js": "^2.8.11",
+2 -1
View File
@@ -387,7 +387,7 @@ export class ContestEditHandler extends Handler {
@param('duration', Types.Float)
@param('title', Types.Title)
@param('content', Types.Content)
@param('rule', Types.Range(Object.keys(contest.RULES).filter((i) => !contest.RULES[i].hidden)))
@param('rule', Types.String)
@param('pids', Types.Content)
@param('rated', Types.Boolean)
@param('code', Types.String, true)
@@ -405,6 +405,7 @@ export class ContestEditHandler extends Handler {
_code = '', autoHide = false, assign: string[] = [], lock: number = null,
contestDuration: number = null, maintainer: number[] = [], allowViewCode = false, allowPrint = false, langs: string[] = [],
) {
if (!Object.keys(contest.RULES).includes(rule) || contest.RULES[rule].hidden) throw new ValidationError('rule');
if (autoHide) this.checkPerm(PERM.PERM_EDIT_PROBLEM);
const pids = _pids.replace(/,/g, ',').split(',').map((i) => +i).filter((i) => i);
const beginAtMoment = moment.tz(`${beginAtDate} ${beginAtTime}`, this.user.timeZone);
+3 -2
View File
@@ -165,13 +165,13 @@ export async function run({
current ||= await UserModel.getByUname(domainId, udoc.username);
if (current) {
report({ message: `duplicate user with email ${udoc.email}: ${current.uname},${udoc.username}` });
uidMap[udoc.username] = current._id;
uidMap[udoc.id] = current._id;
} else {
const uid = await UserModel.create(
udoc.email || `${udoc.username}@jnoj.local`, udoc.username, '',
null, '127.0.0.1', udoc.status === 10 ? SystemModel.get('default.priv') : 0,
);
uidMap[udoc.username] = uid;
uidMap[udoc.id] = uid;
await UserModel.setById(uid, {
loginat: udoc.updated_at,
regat: udoc.created_at,
@@ -445,6 +445,7 @@ memory: ${pdoc.memory_limit}m
: ddoc.entity_id === 'problem' ? pidMap[ddoc.entity_id] : new ObjectId(tidMap[ddoc.entity_id]);
if (!parentId) continue;
const payload = {
_id,
domainId,
content: ddoc.content,
owner: uidMap[ddoc.created_by] || 1,
+2 -2
View File
@@ -8,9 +8,9 @@
"postinstall": "node -r @hydrooj/register install.ts"
},
"dependencies": {
"@xcpcio/board-app": "^0.76.1"
"@xcpcio/board-app": "^0.76.4"
},
"devDependencies": {
"@xcpcio/types": "^0.76.1"
"@xcpcio/types": "^0.76.4"
}
}
+6 -6
View File
@@ -20,9 +20,9 @@
"@fontsource/source-code-pro": "^5.2.7",
"@fontsource/ubuntu-mono": "^5.2.8",
"@hydrooj/utils": "workspace:^",
"@mantine/core": "^8.3.9",
"@mantine/hooks": "^8.3.9",
"@mantine/notifications": "^8.3.9",
"@mantine/core": "^8.3.10",
"@mantine/hooks": "^8.3.10",
"@mantine/notifications": "^8.3.10",
"@sentry/browser": "^10.29.0",
"@sentry/webpack-plugin": "^4.6.1",
"@simplewebauthn/browser": "13.2.2",
@@ -69,7 +69,7 @@
"jquery.transit": "^0.9.12",
"mantine-contextmenu": "^8.3.11",
"matchmedia-polyfill": "^0.3.2",
"md-editor-rt": "^6.2.0",
"md-editor-rt": "^6.2.1",
"mini-css-extract-plugin": "^2.9.4",
"moment": "^2.30.1",
"monaco-editor": "0.52.2",
@@ -101,7 +101,7 @@
"redux-promise-middleware": "^6.2.0",
"redux-thunk": "^3.1.0",
"rupture": "^0.7.1",
"sass": "^1.94.2",
"sass": "^1.95.1",
"sass-loader": "^16.0.6",
"schemastery": "^3.17.2",
"shorty.js": "^1.0.1",
@@ -132,7 +132,7 @@
"html-to-text": "^9.0.5",
"js-yaml": "^4.1.1",
"jsesc": "^3.1.0",
"katex": "^0.16.25",
"katex": "^0.16.27",
"lodash": "^4.17.21",
"markdown-it": "^14.1.0",
"markdown-it-anchor": "^9.2.0",
@@ -13,9 +13,9 @@
<span class="icon icon-{{ items[0].args.icon }}"></span> {{ _(family) }}
</div>
<ol class="menu collapsed">
{%- for item in items -%}
{%- for item in items -%}{% if item.checker(handler) %}
{{ sidemenu.render_item(null, item.name) }}
{%- endfor -%}
{% endif %}{%- endfor -%}
</ol>
</li>
{% endfor %}
+2 -2
View File
@@ -8,7 +8,7 @@
"preview": "vite preview"
},
"dependencies": {
"@vitejs/plugin-react": "^5.1.1",
"@vitejs/plugin-react": "^5.1.2",
"react": "^19.2.1",
"react-dom": "^19.2.1"
},
@@ -16,6 +16,6 @@
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react-swc": "^4.2.2",
"vite": "^7.2.6"
"vite": "^7.2.7"
}
}
+1 -1
View File
@@ -9,7 +9,7 @@
"preferUnplugged": true,
"dependencies": {
"@hydrooj/utils": "workspace:^",
"jsdom": "^27.2.0",
"jsdom": "^27.3.0",
"superagent-charset": "^1.2.0",
"superagent-proxy": "^3.0.0"
},