feat: 优化任务状态与进度体验

This commit is contained in:
meijiali
2026-07-03 14:32:46 +08:00
parent 6a2ced0a07
commit 82d103757b
7 changed files with 203 additions and 5 deletions
+5 -1
View File
@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% set has_running_tasks = tasks | selectattr("status", "equalto", "running") | list | length > 0 %}
{% block title %}任务列表 - 热榜评论分析工具{% endblock %}
{% block content %}
<div class="d-flex justify-content-between align-items-center mb-3">
@@ -57,10 +58,13 @@
<th>操作</th>
</tr>
</thead>
<tbody id="task-table-body">
<tbody id="task-table-body" {% if has_running_tasks %}data-task-list-auto-poll="true"{% endif %}>
{% include "partials/task_rows.html" %}
</tbody>
</table>
</div>
</section>
{% if has_running_tasks %}
<script>document.addEventListener("DOMContentLoaded", () => pollTaskListStatus());</script>
{% endif %}
{% endblock %}