feat: 首次使用无检测通道时,仪表盘自动跳转到部署向导

This commit is contained in:
tian 2026-07-20 10:34:30 +08:00
parent 96e689fec0
commit 2369a1e3dc

View File

@ -913,6 +913,13 @@ func (u *UI) ensureDevicesLoaded() {
}
func (u *UI) pageDashboard(w http.ResponseWriter, r *http.Request) {
// First-time setup: if no recognition units exist, guide to wizard.
if u.preview != nil {
if units, err := u.preview.ListRecognitionUnits(); err == nil && len(units) == 0 {
http.Redirect(w, r, "/ui/wizard", http.StatusFound)
return
}
}
data := u.deviceOverviewPageData(r, nil, "")
if u.tasks != nil {
for _, task := range u.tasks.ListTasks() {