feat: 更新页面实时日志 — SSE轮询 + logs/updates_logs 文件记录
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
<button class="btn btn-sm btn-filled" onclick="createBackup()" style="margin-left:8px">+ 创建备份</button>
|
||||
</div>
|
||||
<div id="backup-list"><span style="color:var(--text-dim);font-size:.85rem">加载中...</span></div>
|
||||
<div id="update-log-area" style="display:none;margin-top:12px">
|
||||
<div style="font-weight:600;margin-bottom:4px">更新日志</div>
|
||||
<pre id="update-log" style="background:var(--md-sys-color-surface-container-lowest);padding:8px;border-radius:var(--shape-xs);max-height:200px;overflow-y:auto;font-size:.8rem;margin:0;white-space:pre-wrap;word-break:break-all"></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -134,6 +138,7 @@
|
||||
setTimeout(loadVersion, 1500);
|
||||
}
|
||||
|
||||
var _updatePollTimer=null;
|
||||
async function applyUpdate() {
|
||||
if (!confirm("确认更新 SenSu?更新前会自动备份当前版本。")) return;
|
||||
document.getElementById("btn-apply").disabled = true;
|
||||
|
||||
Reference in New Issue
Block a user