Widen the administration interface

This commit is contained in:
2026-09-13 01:17:08 +02:00
parent aad1b931ba
commit eaa0a5d1d7
6 changed files with 300 additions and 104 deletions
+12
View File
@@ -196,6 +196,11 @@ type page struct {
// page agrees about who you are without any script involved.
User string
Admin bool
// Wide widens the page for content that is a table rather than a form.
// The reading measure that suits the upload page is far too narrow for a
// listing, which otherwise ends up behind a horizontal scrollbar.
Wide bool
}
// page builds the common fields, resolving the session so the header can show
@@ -261,3 +266,10 @@ func (s *Server) fail(w http.ResponseWriter, r *http.Request, status int, msg st
func (s *Server) handleNotFound(w http.ResponseWriter, r *http.Request) {
s.fail(w, r, http.StatusNotFound, "No such page.")
}
// widePage is page for content that is a listing rather than a form.
func (s *Server) widePage(r *http.Request, title string) page {
p := s.page(r, title, true)
p.Wide = true
return p
}