- 成功状态的构建记录不再显示「重试」按钮,仅保留下载产物/日志/删除; 失败、取消、超时仍保留一键重试(线上核对确认仅新快照成功任务误显示) - retry_build 后端增加 success 状态拦截,防止绕过页面直接 POST - 操作列改为统一 flex 容器(flex-wrap + gap),按钮数量随状态变化时 间距一致、左对齐、窄屏自动换行;后台任务管理页同款统一
92 lines
4.7 KiB
HTML
92 lines
4.7 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}我的构建 · RustDesk 客户端定制平台{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="page-head">
|
|
<h1 class="page-title">我的构建任务</h1>
|
|
<p class="page-subtitle">这里展示你提交的全部自定义客户端构建任务,单次构建通常需要 30~45 分钟。</p>
|
|
</div>
|
|
|
|
{% if builds %}
|
|
<div class="card">
|
|
<div class="table-wrap">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>提交时间</th>
|
|
<th>配置名称</th>
|
|
<th>目标平台</th>
|
|
<th>构建平台</th>
|
|
<th>状态</th>
|
|
<th>任务编号</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for run in builds %}
|
|
<tr>
|
|
<td class="text-muted" style="white-space:nowrap">{{ run.created_at|date:"Y-m-d H:i" }}</td>
|
|
<td><strong>{{ run.filename|default:"—" }}</strong></td>
|
|
<td>{{ run.platform_label }}</td>
|
|
<td><span class="badge {{ run.backend_badge_class }}">{{ run.backend_label }}</span></td>
|
|
<td><span class="badge {{ run.status_badge }} {% if not run.is_finished %}badge-dot{% endif %}">{{ run.status_label }}</span></td>
|
|
<td class="mono text-muted">{{ run.short_uuid }}</td>
|
|
<td class="col-actions">
|
|
<div class="row-actions">
|
|
<a class="btn btn-secondary btn-sm"
|
|
href="/check_for_file?filename={{ run.filename|urlencode }}&uuid={{ run.uuid|urlencode }}&platform={{ run.platform|urlencode }}">
|
|
{% if run.status == 'success' %}<svg class="icon"><use href="#i-download"/></svg> 下载产物{% elif run.is_finished %}<svg class="icon"><use href="#i-eye"/></svg> 查看详情{% else %}<svg class="icon"><use href="#i-eye"/></svg> 查看进度{% endif %}
|
|
</a>
|
|
{% if run.github_log_url %}
|
|
<a class="btn btn-secondary btn-sm" href="{{ run.github_log_url }}" target="_blank" rel="noopener">
|
|
<svg class="icon"><use href="#i-external"/></svg> 日志
|
|
</a>
|
|
{% endif %}
|
|
{% if run.is_finished and run.status != 'success' and run.config_data %}
|
|
<form method="post" class="inline-form" action="{% url 'retry_build' run.id %}"
|
|
onsubmit="return confirm('将使用该任务的原始配置重新提交一次构建(原任务记录保留),是否继续?');">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-secondary btn-sm">
|
|
<svg class="icon"><use href="#i-refresh"/></svg> 重试
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
{% if not run.is_finished %}
|
|
<form method="post" class="inline-form" action="{% url 'stop_build' run.id %}"
|
|
onsubmit="return confirm('确定停止构建任务「{{ run.filename|default:run.short_uuid|escapejs }}」吗?停止后可在列表中使用「重试」重新发起。');">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-warning btn-sm">
|
|
<svg class="icon"><use href="#i-stop"/></svg> 停止
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
{% if run.is_finished %}
|
|
<form method="post" class="inline-form" action="{% url 'delete_my_build' run.id %}"
|
|
onsubmit="return confirm('确定删除任务「{{ run.filename|default:run.short_uuid|escapejs }}」吗?将同时删除服务器上的安装包文件,且不可恢复。');">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn btn-danger btn-sm">
|
|
<svg class="icon"><use href="#i-trash"/></svg> 删除
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="card">
|
|
<div class="empty-state">
|
|
<div class="empty-icon"><svg class="icon" style="width:42px;height:42px"><use href="#i-package"/></svg></div>
|
|
<h3>还没有构建任务</h3>
|
|
<p>填写一份客户端配置,即可开始生成你的专属 RustDesk 客户端。</p>
|
|
<a class="btn btn-primary" href="{% url 'generator' %}">立即定制客户端</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|