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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user