根因: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>
21 lines
595 B
HTML
21 lines
595 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>visionA Local</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<div class="splash">
|
|
<div class="logo">visionA Local</div>
|
|
<div class="spinner"></div>
|
|
<div class="status" id="status">正在啟動伺服器...</div>
|
|
<div class="error" id="error" hidden></div>
|
|
</div>
|
|
</div>
|
|
<script type="module" src="app.js"></script>
|
|
</body>
|
|
</html>
|