refactor(desktop): 替换 WebUI 为 Electron + electron-vite 桌面壳方案

- 使用 electron-vite 构建 main/preload,electron-builder 打包分发
- main process: dev 模式直连 localhost:3000,生产模式 spawn sidecar binary
- 添加 loading 页面,server 就绪前显示加载动画
- 更新 catalog 依赖: electron, electron-vite, electron-builder
- 移除 @webui-dev/bun-webui 依赖
This commit is contained in:
2026-02-08 18:16:13 +08:00
parent e8e473b357
commit 7318600e20
13 changed files with 961 additions and 110 deletions

View File

@@ -0,0 +1,40 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Furtherverse</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #0a0a0a;
color: #fafafa;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.loader {
text-align: center;
}
.spinner {
width: 32px;
height: 32px;
border: 3px solid #333;
border-top-color: #fafafa;
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
p { font-size: 14px; color: #888; }
</style>
</head>
<body>
<div class="loader">
<div class="spinner"></div>
<p>Starting server…</p>
</div>
</body>
</html>