mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: 修复比赛中评测记录列表不会自动刷新的问题
This commit is contained in:
1 parent
998248e212
commit
bc90574735
5 files changed
+11
-8
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.30.10",
|
||||
"version": "2.30.11",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -232,9 +232,9 @@ class RecordMainConnectionHandler extends ConnectionHandler {
|
||||
// eslint-disable-next-line prefer-const
|
||||
let [udoc, pdoc] = await Promise.all([
|
||||
user.getById(this.domainId, rdoc.uid),
|
||||
problem.get(this.domainId, rdoc.pid),
|
||||
problem.get(rdoc.pdomain, rdoc.pid),
|
||||
]);
|
||||
const tdoc = this.tid ? contest.get(this.domainId, new ObjectID(this.tid)) : null;
|
||||
const tdoc = this.tid ? await contest.get(this.domainId, new ObjectID(this.tid)) : null;
|
||||
if (pdoc && !rdoc.contest) {
|
||||
if (pdoc.hidden && !this.user.own(pdoc) && !this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) pdoc = null;
|
||||
if (!this.user.hasPerm(PERM.PERM_VIEW_PROBLEM)) pdoc = null;
|
||||
|
||||
@@ -103,9 +103,9 @@ export interface EventMap extends Record<string, any> {
|
||||
|
||||
function getHooks<K extends keyof EventMap>(name: K) {
|
||||
const hooks = _hooks[name] || (_hooks[name] = []);
|
||||
if (hooks.length >= 128) {
|
||||
if (hooks.length >= 2048) {
|
||||
logger.warn(
|
||||
'max listener count (128) for event "%s" exceeded, which may be caused by a memory leak',
|
||||
'max listener count (2048) for event "%s" exceeded, which may be caused by a memory leak',
|
||||
name,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.14.8",
|
||||
"version": "4.14.9",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{% extends "layout/basic.html" %}
|
||||
{% block content %}
|
||||
{{ set(UiContext, 'socketUrl', "/record-conn?domainId=" + handler.domainId) }}
|
||||
{% if filterTid %}
|
||||
{{ set(UiContext, 'socketUrl', "/record-conn?domainId=" + handler.domainId + "&tid=" + filterTid) }}
|
||||
{% else %}
|
||||
{{ set(UiContext, 'socketUrl', "/record-conn?domainId=" + handler.domainId) }}
|
||||
{% endif %}
|
||||
{{ set(UiContext, 'rids', rdocs.map(eval("rdoc=>rdoc._id.toString()"))) }}
|
||||
<div class="row">
|
||||
<div class="medium-12 columns">
|
||||
@@ -15,7 +19,6 @@
|
||||
</div>
|
||||
<div class="section__body">
|
||||
<div class="row">
|
||||
<!-- TODO: replace with form_builder -->
|
||||
<div class="medium-3 columns">
|
||||
<label class="filter-user">
|
||||
{{ _('By Username / UID') }}
|
||||
|
||||
Reference in new issue
Block a user