mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-30 04:40:18 +08:00
feat: 版本管理 + macOS提示优化 + 部署文档更新
- OpenClaw 版本管理: 安装/升级/降级/切换版本, 汉化版/原版选择 - 新增 list_openclaw_versions API (Rust + Web) - upgrade_openclaw 支持指定版本号 - 版本选择器弹窗 (about.js) - macOS Gatekeeper 提示优化: 强调拖入应用程序, No such file 备选 - 部署文档统一使用 npm run serve 替代 npx vite - showUpgradeModal 支持自定义标题 + onClose 回调 - serve.js 路径分隔符跨平台修复 - 扩展工具页面优化 + AI助手危险工具确认
This commit is contained in:
@@ -141,12 +141,12 @@ export function showModal({ title, fields, onConfirm }) {
|
||||
* 升级进度弹窗 — 带进度条和实时日志
|
||||
* @returns {{ appendLog, setProgress, setDone, setError, destroy }}
|
||||
*/
|
||||
export function showUpgradeModal() {
|
||||
export function showUpgradeModal(title) {
|
||||
const overlay = document.createElement('div')
|
||||
overlay.className = 'modal-overlay'
|
||||
overlay.innerHTML = `
|
||||
<div class="modal" style="max-width:520px">
|
||||
<div class="modal-title">升级 OpenClaw</div>
|
||||
<div class="modal-title">${title || '升级 OpenClaw'}</div>
|
||||
<div class="upgrade-progress-wrap">
|
||||
<div class="upgrade-progress-bar"><div class="upgrade-progress-fill" style="width:0%"></div></div>
|
||||
<div class="upgrade-progress-text">准备中...</div>
|
||||
@@ -165,9 +165,10 @@ export function showUpgradeModal() {
|
||||
const closeBtn = overlay.querySelector('[data-action="close"]')
|
||||
const _logLines = []
|
||||
|
||||
closeBtn.onclick = () => overlay.remove()
|
||||
let _onClose = null
|
||||
closeBtn.onclick = () => { overlay.remove(); _onClose?.() }
|
||||
overlay.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && !closeBtn.disabled) overlay.remove()
|
||||
if (e.key === 'Escape' && !closeBtn.disabled) { overlay.remove(); _onClose?.() }
|
||||
})
|
||||
|
||||
return {
|
||||
@@ -206,6 +207,7 @@ export function showUpgradeModal() {
|
||||
closeBtn.disabled = false
|
||||
closeBtn.focus()
|
||||
},
|
||||
destroy() { overlay.remove() },
|
||||
onClose(fn) { _onClose = fn },
|
||||
destroy() { overlay.remove(); _onClose?.() },
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user