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:
晴天
2026-03-08 01:46:27 +08:00
parent dbc2aa8a61
commit 02e1ef6b14
23 changed files with 1892 additions and 381 deletions

View File

@@ -145,13 +145,14 @@ install_clawpanel() {
cd "$INSTALL_DIR"
npx vite build
echo "✅ ClawPanel 安装完成: $INSTALL_DIR"
echo "✅ 启动命令: npm run serve"
}
# 创建 systemd 服务
setup_systemd() {
if ! command -v systemctl &> /dev/null; then
echo "⚠️ systemd 不可用,请手动启动:"
echo " cd $INSTALL_DIR && npx vite --port $PANEL_PORT --host 0.0.0.0"
echo " cd $INSTALL_DIR && npm run serve -- --port $PANEL_PORT"
return 0
fi
@@ -168,7 +169,7 @@ After=network.target
Type=simple
User=$(whoami)
WorkingDirectory=$INSTALL_DIR
ExecStart=$(which npx) vite preview --port $PANEL_PORT --host 0.0.0.0
ExecStart=$(which node) scripts/serve.js --port $PANEL_PORT
Restart=on-failure
RestartSec=5
Environment=NODE_ENV=production
@@ -189,7 +190,7 @@ After=network.target
[Service]
Type=simple
WorkingDirectory=$INSTALL_DIR
ExecStart=$(which npx) vite preview --port $PANEL_PORT --host 0.0.0.0
ExecStart=$(which node) scripts/serve.js --port $PANEL_PORT
Restart=on-failure
RestartSec=5
Environment=NODE_ENV=production