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
f820a089c6
commit
14948e97a7
9 files changed
+74
-35
No files matched your search
@@ -38,7 +38,7 @@ export class ProblemHandler extends Handler {
|
||||
page, pcount, ppcount, pdocs, psdict, category,
|
||||
} = this.response.body;
|
||||
this.response.body = {
|
||||
title: this.renderTitle(category),
|
||||
title: this.renderTitle(this.translate('problem_main')),
|
||||
fragments: (await Promise.all([
|
||||
this.renderHTML('partials/problem_list.html', {
|
||||
page, ppcount, pcount, pdocs, psdict,
|
||||
@@ -92,8 +92,10 @@ export class ProblemMainHandler extends ProblemHandler {
|
||||
if (q) {
|
||||
const pdoc = await problem.get(domainId, +q || q, problem.PROJECTION_LIST);
|
||||
if (pdoc) {
|
||||
const count = pdocs.length;
|
||||
pdocs = pdocs.filter((doc) => doc.docId !== pdoc.docId);
|
||||
pdocs.unshift(pdoc);
|
||||
pcount = pcount - count + pdocs.length;
|
||||
}
|
||||
}
|
||||
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
|
||||
|
||||
Reference in new issue
Block a user