Update pages in place instead of reloading them

A page that is working fetches itself again and swaps only its content;
the log on the Packages page follows new text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
2026-11-18 00:18:18 +01:00
co-authored by Claude Sonnet 5.5
parent 4ee28b812b
commit c2115aba03
6 changed files with 46 additions and 8 deletions
+3 -3
View File
@@ -368,7 +368,7 @@ func securityHeaders(next http.Handler) http.Handler {
type page struct {
Title string
CSRF string
Refresh int // seconds; 0 = none
Live int // seconds between updates of the content without a reload (live.js); 0 = none
Flash string
Error string
LoggedIn bool
@@ -495,9 +495,9 @@ func (a *app) overview(w http.ResponseWriter, r *http.Request, sess session) {
Data: overviewData{Status: st, Dashboard: a.dashboardData(r.URL.Query().Get("range"))}}
switch {
case st.Applying || st.ConfirmRunning:
p.Refresh = 2
p.Live = 2
case st.RollbackIn > 0:
p.Refresh = 10
p.Live = 10
}
a.render(w, "overview", p)
}