Skip to content

Commit 273ff95

Browse files
committed
ui: add contest_problemlist to contest sidebar
1 parent 240b299 commit 273ff95

5 files changed

Lines changed: 8 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"mongodb-memory-server": "10.1.4",
5454
"nyc": "^17.1.0",
5555
"ora": "^8.2.0",
56-
"oxlint": "^1.2.0",
56+
"oxlint": "^1.3.0",
5757
"package-json": "^10.0.1",
5858
"semver": "^7.7.2",
5959
"simple-git": "^3.28.0",

packages/hydrooj/src/handler/contest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class ContestDetailBaseHandler extends Handler {
123123
{
124124
name: 'contest_problemlist',
125125
args: { tid, prefix: 'contest_problemlist' },
126-
checker: () => true,
126+
checker: () => this.tsdoc?.attend || contest.isDone(this.tdoc),
127127
},
128128
{
129129
name: 'contest_scoreboard',

packages/ui-default/locales/zh.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ Problem Category: 标签
694694
Problem Data: 题目数据
695695
Problem ID cannot be a pure number. Leave blank if you want to use numberic id.: 题目ID不能为纯数字。 若要自动分配数字ID请将此处留空。
696696
Problem ID List: 题目 ID 列表
697+
Problem List: 题目列表
697698
Problem Set: 题库
698699
Problem Settings: 题目设置
699700
Problem Solution List: 题解列表

packages/ui-default/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"jquery.easing": "^1.4.1",
6767
"jquery.transit": "^0.9.12",
6868
"matchmedia-polyfill": "^0.3.2",
69-
"md-editor-rt": "^5.7.0",
69+
"md-editor-rt": "^5.7.1",
7070
"mini-css-extract-plugin": "^2.9.2",
7171
"moment": "^2.30.1",
7272
"monaco-editor": "0.52.2",

packages/ui-default/templates/partials/contest_sidebar.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ <h1>{{ tdoc.title }}</h1>
6464
</a>
6565
{% endif %}
6666
</li>
67+
{% else %}
68+
<li class="menu__item"><a class="menu__link" href="{{ url('contest_problemlist', tid=tdoc.docId) }}">
69+
<span class="icon icon-unordered_list"></span> {{ _('Problem List') }}
70+
</a></li>
6771
{% endif %}{# not attend and not done #}
6872
{% if model.contest.canShowScoreboard.call(handler, tdoc, False) %}
6973
<li class="menu__item"><a class="menu__link" href="{{ url('contest_scoreboard', tid=tdoc.docId) }}">

0 commit comments

Comments
 (0)