From 2369a1e3dc4ecb59ace84bb0c3b5e172e78aee39 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Mon, 20 Jul 2026 10:34:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E6=AC=A1=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=97=A0=E6=A3=80=E6=B5=8B=E9=80=9A=E9=81=93=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E7=9B=98=E8=87=AA=E5=8A=A8=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E9=83=A8=E7=BD=B2=E5=90=91=E5=AF=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/web/ui.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/web/ui.go b/internal/web/ui.go index 116e887..54b4dde 100644 --- a/internal/web/ui.go +++ b/internal/web/ui.go @@ -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() {