根因:visiona-local/frontend/ 是從 edge-ai-platform 複製過來的 installer wizard HTML/JS/CSS,整組沒清理。main.go 的 //go:embed all:frontend 把這堆 wizard 直接當 Wails 主視窗內容,使用者開啟 app 看到的就是 "Edge AI Platform Installer" 而不是 Next.js 主 UI。macOS dmg 版本也有同樣問題,只是之前驗證時沒開 Wails 視窗而是用瀏覽器直連 localhost:3721 所以沒抓到。 修法:把 visiona-local/frontend/ 重寫為極簡 splash: - index.html:splash 畫面 - app.js:import GetServerStatus / GetServerURL binding,輪詢直到 server ready, window.location.replace(url + '/') 跳到 Next.js 主 UI - style.css:splash 樣式 Next.js 主 UI 不使用任何 Wails JS binding(純 HTTP API),所以從 wails:// 跳到 http://127.0.0.1:<port>/ 後功能完整可用。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
63 lines
1.2 KiB
CSS
63 lines
1.2 KiB
CSS
/* visionA Local — splash screen */
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
html, body {
|
|
height: 100%;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft JhengHei', sans-serif;
|
|
background: #0b1020;
|
|
color: #e6e8f0;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
#app {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.splash {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 24px;
|
|
padding: 48px;
|
|
}
|
|
|
|
.logo {
|
|
font-size: 28px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.02em;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.spinner {
|
|
width: 42px;
|
|
height: 42px;
|
|
border: 3px solid rgba(255, 255, 255, 0.12);
|
|
border-top-color: #6ea8ff;
|
|
border-radius: 50%;
|
|
animation: spin 0.9s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
.status {
|
|
font-size: 14px;
|
|
color: #a7b0c6;
|
|
}
|
|
|
|
.error {
|
|
max-width: 560px;
|
|
padding: 16px 20px;
|
|
background: rgba(220, 38, 38, 0.12);
|
|
border: 1px solid rgba(220, 38, 38, 0.4);
|
|
border-radius: 8px;
|
|
color: #fca5a5;
|
|
font-size: 13px;
|
|
line-height: 1.5;
|
|
text-align: center;
|
|
}
|