mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 17:38:19 +08:00
ui: fix display
This commit is contained in:
1 parent
791877098b
commit
bc4d424abf
6 files changed
+5
-6
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.29.4",
|
||||
"version": "2.29.5",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -225,7 +225,7 @@ 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, null),
|
||||
problem.get(this.domainId, rdoc.pid),
|
||||
]);
|
||||
if (pdoc) {
|
||||
if (pdoc.hidden && !this.user.own(pdoc) && !this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN)) pdoc = null;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { md5 } from './crypto';
|
||||
type AvatarProvider = (src: string, size: number) => string;
|
||||
|
||||
export const providers: Record<string, AvatarProvider> = {
|
||||
gravatar: (email, size) => `//gravatar.loli.net/avatar/${md5((email || '').toString().trim().toLowerCase())}?d=mm&s=${size || 32}`,
|
||||
gravatar: (email, size) => `//cn.gravatar.com/avatar/${md5((email || '').toString().trim().toLowerCase())}?d=mm&s=${size || 32}`,
|
||||
qq: (id) => `//q1.qlogo.cn/g?b=qq&nk=${(/(\d+)/g.exec(id) || ['', ''])[1]}&s=640`,
|
||||
github: (id, size) => `//github.com/${id}.png?size=${Math.min(size, 460)}`,
|
||||
url: (url) => url,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.12.1",
|
||||
"version": "4.12.2",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
<option value="7">{{ _('Compile Error') }}</option>
|
||||
<option value="8">{{ _('System Error') }}</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</button> |
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if pdoc and (not pdoc.hidden or handler.user.hasPerm(perm.PERM_VIEW_PROBLEM_HIDDEN)) %}
|
||||
{% if pdoc and (not pdoc.hidden or handler.user.hasPerm(perm.PERM_VIEW_PROBLEM_HIDDEN) or handler.user.own(pdoc)) %}
|
||||
{{ problem.render_problem_title(pdoc, show_tags=false) }}
|
||||
{% else %}
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user