Put the Update and Packages pages on one Updates page
Router software and packages are two parts of one page, with one overlay, one confirmation banner and both logs. /upgrade redirects to it; the actions keep their addresses. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -294,17 +294,8 @@ func (a *app) upgradeData() upgradeData {
|
||||
return d
|
||||
}
|
||||
|
||||
func (a *app) upgradePage(w http.ResponseWriter, r *http.Request, sess session) {
|
||||
d := a.upgradeData()
|
||||
p := page{Title: "Packages", CSRF: sess.csrf, LoggedIn: true, Data: d, Flash: r.URL.Query().Get("msg")}
|
||||
if d.Run.Running {
|
||||
p.Live = 3
|
||||
}
|
||||
a.render(w, "upgrade", p)
|
||||
}
|
||||
|
||||
func (a *app) upgradeBack(w http.ResponseWriter, r *http.Request, msg string) {
|
||||
http.Redirect(w, r, "/upgrade?msg="+url.QueryEscape(msg), http.StatusSeeOther)
|
||||
http.Redirect(w, r, "/update?msg="+url.QueryEscape(msg)+"#packages", http.StatusSeeOther)
|
||||
}
|
||||
|
||||
func (a *app) upgradeChannel(w http.ResponseWriter, r *http.Request, _ session) {
|
||||
|
||||
Reference in New Issue
Block a user