Skip to content

Commit

Permalink
feat: add IP Address Field
Browse files Browse the repository at this point in the history
  • Loading branch information
aokblast committed Nov 4, 2023
1 parent 43f0a76 commit 5977f67
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
"runtime": "run time",
"memory": "memory",
"lang": "lang",
"time": "time"
"time": "time",
"ip_addr": "IP Address"
}
},
"submission": {
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
"runtime": "執行時間",
"memory": "記憶體用量",
"lang": "語言",
"time": "繳交時間"
"time": "繳交時間",
"ip_addr": "IP 位址"
}
},
"submission": {
Expand Down
2 changes: 2 additions & 0 deletions src/pages/course/[name]/submissions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ function copySubmissionLink(path: string) {
<th>{{ $t("course.submissions.table.memory") }}</th>
<th>{{ $t("course.submissions.table.lang") }}</th>
<th>{{ $t("course.submissions.table.time") }}</th>
<th>{{ $t("course.submissions.table.ip_addr") }}</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -235,6 +236,7 @@ function copySubmissionLink(path: string) {
<span>{{ timeFromNow(submission.timestamp) }}</span>
</div>
</td>
<td>{{ submission.ip_addr }}</td>
</tr>
</tbody>
</table>
Expand Down
1 change: 1 addition & 0 deletions src/types/submission.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ interface SubmissionListItem {
submissionId: string;
timestamp: number;
user: UserInfo;
ip_addr: string;
}

type SubmissionList = SubmissionListItem[];
Expand Down

0 comments on commit 5977f67

Please sign in to comment.