fix: 英文转译

This commit is contained in:
DengDai
2025-11-24 21:25:38 +08:00
parent c9e11c4bd1
commit 982925b699
5 changed files with 35 additions and 24 deletions

View File

@@ -34,33 +34,37 @@
</div>
</div>
{% if current_user.role == 'admin' %}
{% if current_user.role in ['admin', 'trust_user'] %}
<div class="card shadow-sm mb-4">
<div class="card-header"><h5 class="mb-0">管理员操作</h5></div>
<div class="card-header"><h5 class="mb-0">{% if current_user.role == 'admin' %}管理员操作{% else %}信任用户操作{% endif %}</h5></div>
<div class="card-body d-grid gap-2">
{% if report.status == 'pending' or report.status == 'in_review' %}
<form action="{{ url_for('main.process_report', report_id=report.id) }}" method="POST" class="d-grid">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="action" value="confirm">
<button type="submit" class="btn btn-success">确认违规 (加入黑名单)</button>
</form>
<form action="{{ url_for('main.process_report', report_id=report.id) }}" method="POST" class="d-grid">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="action" value="invalidate">
<button type="submit" class="btn btn-warning">举报无效</button>
</form>
{% elif report.status == 'approved' %}
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#revokeModal">
撤销批准并移出黑名单
</button>
{% if current_user.role == 'admin' %}
{% if report.status == 'pending' or report.status == 'in_review' %}
<form action="{{ url_for('main.process_report', report_id=report.id) }}" method="POST" class="d-grid">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="action" value="confirm">
<button type="submit" class="btn btn-success">确认违规 (加入黑名单)</button>
</form>
<form action="{{ url_for('main.process_report', report_id=report.id) }}" method="POST" class="d-grid">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="action" value="invalidate">
<button type="submit" class="btn btn-warning">举报无效</button>
</form>
{% elif report.status == 'approved' %}
<button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#revokeModal">
撤销批准并移出黑名单
</button>
{% else %}
<p class="text-muted mb-0">该举报已处理完毕,无更多操作。</p>
{% endif %}
{% else %}
<p class="text-muted mb-0">该举报已处理完毕,无更多操作</p>
<p class="text-muted mb-0">您可以在下方添加审核建议</p>
{% endif %}
</div>
</div>
{% endif %}
{% if related_reports %}
{% if current_user.role in ['admin'] and related_reports %}
<div class="card shadow-sm mb-4">
<div class="card-header"><h5 class="mb-0">相关举报 (同一邮箱)</h5></div>
<div class="list-group list-group-flush">
@@ -79,6 +83,7 @@
</div>
<!-- 右侧评论区 -->
{% if current_user.role in ['admin', 'trust_user'] %}
<div class="col-lg-7">
<div class="card shadow-sm">
<div class="card-header"><h5 class="mb-0">审核与讨论</h5></div>
@@ -115,6 +120,7 @@
{% endif %}
</div>
</div>
{% endif %}
</div>
<!-- 撤销操作的 Modal -->

View File

@@ -15,7 +15,7 @@
<li class="list-group-item"><strong>邮箱:</strong> {{ entry.email }}</li>
<li class="list-group-item"><strong>站点:</strong> {{ entry.pt_site }}</li>
{% if entry.report %}
<li class="list-group-item"><strong>违规原因:</strong> {{ entry.report.reason_category }}</li>
<li class="list-group-item"><strong>违规原因:</strong> {{ entry.report.reason_category | translate_reason }}</li>
{% endif %}
</ul>

View File

@@ -25,7 +25,7 @@
<td>#{{ report.id }}</td>
<td>{{ report.reported_pt_site }}</td>
<td>{{ report.reported_email }}</td>
<td>{{ report.reason_category }}</td>
<td>{{ report.reason_category | translate_reason }}</td>
<td>
<span class="badge
{% if report.status == 'approved' %} bg-success