Widgets tab links the external demo when config.json names one (demo_url)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-09-19 08:58:36 -07:00
co-authored by Claude Fable 5.1
parent 65a9888784
commit 62605d57eb
7 changed files with 18 additions and 5 deletions
+3 -1
View File
@@ -736,10 +736,12 @@ func (s *Server) me(w http.ResponseWriter, _ *http.Request) {
}
}
_, rebootErr := os.Stat("/run/reboot-required")
var demoURL string
s.cfg.View(func(c *config.Config) { demoURL = c.DemoURL })
jsonOK(w, 200, map[string]any{
"host": s.host, "user": s.user, "version": s.version,
"load": load, "uptime": uptime, "service_started": s.started,
"reboot_needed": rebootErr == nil, "fingerprint": s.fingerprint, "arch": runtime.GOARCH,
"reboot_needed": rebootErr == nil, "fingerprint": s.fingerprint, "arch": runtime.GOARCH, "demo_url": demoURL,
})
}