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

@@ -54,8 +54,8 @@ docker run -d \
npm install -g @qingchencloud/openclaw-zh --registry https://registry.npmmirror.com && \
openclaw init 2>/dev/null || true && \
git clone https://github.com/qingchencloud/clawpanel.git /app && \
cd /app && npm install && \
npx vite --port 1420 --host 0.0.0.0"
cd /app && npm install && npm run build && \
npm run serve"
```
访问 `http://服务器IP:1420` 即可使用。
@@ -120,7 +120,9 @@ RUN git clone https://github.com/qingchencloud/clawpanel.git . && \
EXPOSE 1420
CMD ["npx", "vite", "--port", "1420", "--host", "0.0.0.0"]
RUN npm run build
CMD ["npm", "run", "serve"]
```
启动:
@@ -151,7 +153,9 @@ RUN git clone https://github.com/qingchencloud/clawpanel.git . && \
EXPOSE 1420
CMD ["npx", "vite", "--port", "1420", "--host", "0.0.0.0"]
RUN npm run build
CMD ["npm", "run", "serve"]
```
构建并运行:

View File

@@ -991,6 +991,13 @@
<span class="dl-format">.dmg</span>
</a>
</div>
<div style="margin-top:16px;padding:12px;border-radius:10px;background:rgba(234,179,8,0.08);border:1px solid rgba(234,179,8,0.15);text-align:left">
<p style="font-size:12px;color:var(--text-s);margin-bottom:6px"><strong style="color:#eab308">⚠️ 首次打开提示"已损坏"或"无法验证"</strong></p>
<p style="font-size:12px;color:var(--text-s);margin-bottom:8px">① 先将 ClawPanel <strong>拖入「应用程序」文件夹</strong>,然后打开终端执行:</p>
<code style="display:block;font-size:11px;padding:8px 10px;border-radius:6px;background:rgba(0,0,0,0.15);color:var(--accent);word-break:break-all;cursor:pointer" onclick="navigator.clipboard.writeText('sudo xattr -rd com.apple.quarantine /Applications/ClawPanel.app');this.textContent='✅ 已复制!';setTimeout(()=>this.textContent='sudo xattr -rd com.apple.quarantine /Applications/ClawPanel.app',1500)">sudo xattr -rd com.apple.quarantine /Applications/ClawPanel.app</code>
<p style="font-size:11px;color:var(--text-t);margin-top:6px">② 或前往 <strong>系统设置 → 隐私与安全性</strong>,找到 ClawPanel 点击「仍要打开」</p>
<p style="font-size:11px;color:var(--text-t);margin-top:4px">提示 No such file说明没拖入应用程序改用<code style="font-size:10px;color:var(--accent);cursor:pointer" onclick="navigator.clipboard.writeText('sudo xattr -rd com.apple.quarantine ~/Downloads/ClawPanel.app');this.textContent='✅ 已复制';setTimeout(()=>this.textContent='sudo xattr -rd com.apple.quarantine ~/Downloads/ClawPanel.app',1500)">sudo xattr -rd com.apple.quarantine ~/Downloads/ClawPanel.app</code></p>
</div>
</div>
<div class="reveal download-card">
<span class="download-icon"><svg width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="var(--text)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8"/><path d="M12 17v4"/><path d="m6 8 4 4-4 4"/><path d="M12 16h4"/></svg></span>

View File

@@ -128,20 +128,27 @@ cd clawpanel
npm install
```
### 4. 启动 ClawPanel Web
### 4. 构建并启动 ClawPanel Web
```bash
npx vite --port 1420 --host 0.0.0.0
npm run build # 构建生产版前端
npm run serve # 启动 Web 服务器 (默认 0.0.0.0:1420)
```
自定义端口:
```bash
npm run serve -- --port 8080
```
看到以下输出即为成功:
```
VITE v6.x.x ready in xxx ms
➜ Local: http://localhost:1420/
➜ Network: http://xxx.xxx.xxx.xxx:1420/
[dev-api] 开发 API 已启动,配置目录: /root/.openclaw
┌─────────────────────────────────────────┐
│ 🦀 ClawPanel Web Server (Headless) │
http://localhost:1420/
└─────────────────────────────────────────┘
[api] API 已启动,配置目录: /root/.openclaw
```
打开浏览器访问 `http://服务器IP:1420` 即可使用 ClawPanel。
@@ -164,7 +171,7 @@ docker run -d \
sh -c "apt-get update && apt-get install -y git && \
npm install -g @qingchencloud/openclaw-zh --registry https://registry.npmmirror.com && \
git clone https://github.com/qingchencloud/clawpanel.git /app && \
cd /app && npm install && npx vite --port 1420 --host 0.0.0.0"
cd /app && npm install && npm run build && npm run serve"
```
---
@@ -204,7 +211,7 @@ After=network.target
Type=simple
User=root
WorkingDirectory=/opt/clawpanel
ExecStart=/usr/bin/npx vite --port 1420 --host 0.0.0.0
ExecStart=/usr/bin/node scripts/serve.js
Restart=on-failure
RestartSec=5
Environment=NODE_ENV=production
@@ -236,7 +243,8 @@ sudo journalctl -u clawpanel -f # 查看日志
npm install -g pm2
cd /opt/clawpanel
pm2 start "npx vite --port 1420 --host 0.0.0.0" --name clawpanel
npm run build
pm2 start "npm run serve" --name clawpanel
pm2 save
pm2 startup # 开机自启
```
@@ -324,7 +332,7 @@ npm install -g @qingchencloud/openclaw-zh@latest --registry https://registry.npm
lsof -i :1420
# 使用其他端口
npx vite --port 3000 --host 0.0.0.0
npm run serve -- --port 3000
```
systemd 服务也需要改 ExecStart 中的端口。
@@ -365,7 +373,7 @@ openclaw gateway start &
# 启动 ClawPanel Web
cd /opt/clawpanel
npx vite --port 1420 --host 0.0.0.0
npm run serve
```
或者用 systemd 分别创建两个服务。也可以在 ClawPanel 面板中直接点击「启动」按钮管理 Gateway。

9
docs/update/latest.json Normal file
View File

@@ -0,0 +1,9 @@
{
"version": "0.6.0",
"minAppVersion": "0.6.0",
"hash": "",
"url": "",
"size": 0,
"changelog": "",
"releasedAt": ""
}