Files
rdgen/rdgenerator/templates/waiting.html
T

78 lines
3.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}构建进行中 · RustDesk 客户端定制平台{% endblock %}
{% block page_class %}page-narrow{% endblock %}
{% block content %}
<div class="card">
<div class="card-body result-wrap">
<div class="spinner"></div>
<h2 class="result-title">正在构建自定义客户端</h2>
<p class="result-desc">
构建通常需要 <strong>30~45 分钟</strong>,本页每 30 秒自动刷新一次状态。<br>
你也可以关闭本页,稍后到「我的构建」中查看结果。
</p>
<div class="progress-bar"><div class="progress-bar-fill"></div></div>
<p style="margin:0 0 6px">
当前状态:
<span class="badge {{ status_badge }} badge-dot" id="statusBadge">{{ status_label }}</span>
<span id="stageText" class="text-muted" style="font-size:12.5px;margin-left:8px"></span>
</p>
<div class="info-box" style="margin-top:24px">
<div class="info-box-title"><svg class="icon"><use href="#i-package"/></svg> 任务信息</div>
<div>配置名称:<strong>{{ filename }}</strong></div>
<div>目标平台:<strong id="platformText">{{ platform }}</strong></div>
{% if log_url %}
<div style="margin-top:8px">
<a href="{{ log_url }}" target="_blank" rel="noopener">
<svg class="icon"><use href="#i-external"/></svg> 技术排查:查看 GitHub Actions 构建日志
</a>
</div>
{% endif %}
</div>
<div class="btn-row" style="justify-content:center">
<a class="btn btn-secondary btn-sm" href="{% url 'my_builds' %}">查看我的构建列表</a>
<a class="btn btn-secondary btn-sm" href="{% url 'generator' %}">继续新建任务</a>
</div>
</div>
</div>
{% endblock %}
{% block head_extra %}
<script>
(function () {
var platformLabels = {
'windows': 'Windows 64 位',
'windows-x86': 'Windows 32 位',
'linux': 'Linux',
'android': 'Android',
'macos': 'macOS'
};
var platform = ('' + '{{ platform|escapejs }}').toLowerCase();
document.getElementById('platformText').textContent = platformLabels[platform] || platform;
document.title = '正在构建客户端';
// 状态阶段提示(仅用于本地动画展示,实际状态以服务端轮询为准)
var stages = ['正在初始化构建环境…', '正在拉取并编译源码…', '正在生成平台安装包…', '正在打包与上传产物…'];
var i = 0;
var stageEl = document.getElementById('stageText');
if (stageEl) {
stageEl.textContent = stages[0];
setInterval(function () {
i = (i + 1) % stages.length;
stageEl.textContent = stages[i];
}, 8000);
}
// 30 秒后整页轮询一次服务端状态
setTimeout(function () {
window.location.replace('/check_for_file?filename={{ filename|urlencode }}&uuid={{ uuid|urlencode }}&platform={{ platform|urlencode }}');
}, 30000);
})();
</script>
{% endblock %}