-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust suspicious attribute to suspicious group (#200)
* Adjust suspicious attribute to suspicious group * Frontend for suspicious - Don't show score & rank for suspicious - Handle cases when suspicious_words is empty * Update suspicious wording
- Loading branch information
Showing
8 changed files
with
57 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,19 +48,19 @@ | |
<small>{{ new Date(announcement.time).toLocaleString() }}</small> | ||
<a href="/announcements/">查看所有公告</a> | ||
</div> | ||
<div v-if="user.suspicious" class="msg-error"> | ||
经裁判组检查,你的账号有以下疑似违规行为:{{ user.suspicious_reason }}。 | ||
你的账号将会在 {{ new Date(user.suspicious_ddl).toLocaleString() }} 之后被封禁。 | ||
如果你有异议,请尽快联系 <a href="mailto:[email protected]">[email protected]</a>, | ||
提供你的 Token 以及申诉理由。在封禁之前,你仍可正常参加比赛。 | ||
<div v-if="user.group==='suspicious'" class="msg-error"> | ||
经裁判组检查,你的账号{{ suspicious_words }}。 | ||
你的分数暂时不计入排行榜,你仍可继续完成题目。 | ||
你可以在比赛期间及比赛结束后 24 小时内联系组委会配合审核,审核通过后你的分数会重新计入排行榜。 | ||
请发邮件至 <a href="mailto:[email protected]">[email protected]</a>,邮件中包含你的 Token。 | ||
</div> | ||
<div v-if="user" class="msg-info"> | ||
<label for="token">Token:</label> | ||
<button @click="token_show=!token_show">{{ token_show?'隐藏':'显示' }}</button> | ||
<input v-show="token_show" type="text" id="token" :value="user.token" readonly> | ||
<button onclick="token_copy()">{{ token_copy_text }}</button> | ||
Token 是一些题目的登录凭证,禁止分享,否则视为作弊 | ||
<template v-if="progress.scores.find(i=>i.category===null)"> | ||
<template v-if="progress.scores.find(i=>i.category===null) && user.group!=='suspicious'"> | ||
<a href="/board/"> | ||
<br> | ||
当前分数:{{ (progress.scores.find(i=>i.category===null)||{score:0}).score }}, | ||
|
@@ -218,6 +218,13 @@ <h1>{{ opened.name }}</h1> | |
categories() { | ||
return [...new Set(this.challenges.map(i => i.category))].sort(); | ||
}, | ||
suspicious_words() { | ||
if (this.user && this.user.suspicious_reason) { | ||
return "有以下疑似违规行为:" + this.user.suspicious_reason; | ||
} else { | ||
return "有疑似违规行为"; | ||
} | ||
} | ||
}, | ||
methods: { | ||
open(challenge) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
server/user/migrations/0018_remove_user_suspicious_remove_user_suspicious_ddl_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 4.2.16 on 2024-10-31 06:05 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("user", "0017_update_groups_2024"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="user", | ||
name="suspicious", | ||
), | ||
migrations.RemoveField( | ||
model_name="user", | ||
name="suspicious_ddl", | ||
), | ||
migrations.RemoveField( | ||
model_name="userlog", | ||
name="suspicious", | ||
), | ||
migrations.RemoveField( | ||
model_name="userlog", | ||
name="suspicious_ddl", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters