Skip to content

Commit

Permalink
Merge pull request #465 from decert-me/feat-464
Browse files Browse the repository at this point in the history
feat: rating modal
  • Loading branch information
0xdwong authored Oct 29, 2024
2 parents 462613c + 2444666 commit d977f06
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/assets/locales/en-US/rate.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"action": "Actions",
"last-submit-time": "Lastest Submission Time",
"last-rate-time": "Last Grading Time",
"last-rate": "Last score",
"submit-num": "Submitted times",
"num-submit": "{{num}}th submission",

"reset": "Reset",
"ok": "Confirm",
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locales/zh-CN/rate.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"action": "操作",
"last-submit-time": "最新提交时间",
"last-rate-time": "上次评分时间",
"last-rate": "上次评分",
"submit-num": "提交次数",
"num-submit": "第 {{num}} 次提交",

"reset": "重置",
"ok": "确认",
Expand Down
13 changes: 13 additions & 0 deletions src/views/Rating/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ function RatingModal({ data, isMobile, onFinish }, ref) {
<h1>{selectOpenQs?.challenge_title}</h1>
<Spin spinning={loading}>
<div className="judg-info">

<div className="item item-flex">
<p className="item-title">{t("num-submit", {num: selectOpenQs?.submit_count})}</p>
</div>

<div className="item item-flex">
<p className="item-title">{t("challenger")}:</p>
<div className="item-content">
Expand Down Expand Up @@ -275,6 +280,14 @@ function RatingModal({ data, isMobile, onFinish }, ref) {
/>

</div>

<div className="item item-flex">
<p className="item-title">{t("last-rate")}:</p>
<div className="item-content">
<p>{selectOpenQs?.last_score}</p>
</div>
</div>

<div style={{width: "352px"}}>
<Slider
disabled={!onFinish}
Expand Down

0 comments on commit d977f06

Please sign in to comment.