feat: 添加强制更新Lua脚本的配置并优化前端更新按钮

新增配置API的force_update字段返回与保存支持,更新终端Lua脚本逻辑以支持强制更新标记,同时简化前端更新按钮,移除模拟进度条并动态切换按钮状态与显示文本。
This commit is contained in:
2026-07-10 23:38:03 +08:00
parent 78f302381a
commit 8a78034ad3
6 changed files with 16 additions and 25 deletions
+4 -8
View File
@@ -815,14 +815,10 @@
<div>
<label style="display:block; margin-bottom:8px; font-weight:600;">Lua 脚本更新控制</label>
<div class="flex" style="flex-direction: column; gap: 10px;">
<div v-if="!isPushingUpdate">
<button @click="pushLuaUpdate"><i class="fas fa-satellite-dish"></i> 手动推送更新</button>
</div>
<div v-else class="progress-container" style="width: 100%; max-width: 300px;">
<div style="margin-bottom: 5px; font-size: 0.9rem; color: #666;">推送中... {{ updateProgress }}%</div>
<div class="progress-bar" style="height: 10px; background: #eee; border-radius: 5px; overflow: hidden;">
<div class="progress-fill" :style="{ width: updateProgress + '%', height: '100%', background: '#4caf50', transition: 'width 0.1s' }"></div>
</div>
<div>
<button @click="pushLuaUpdate" :disabled="isPushingUpdate">
<i class="fas fa-satellite-dish"></i> {{ isPushingUpdate ? '推送中...' : '手动推送更新' }}
</button>
</div>
<div class="text-muted" style="font-size: 0.9rem;">
点击按钮后,将向全服所有终端发送更新指令,并在 5 秒内生效。<br>终端将在业务空闲时静默下载更新并重启,未加载的机器在加载后也会第一时间更新。