footer: Add a semi-flexible template system

This commit is contained in:
Tom Wiesing 2023-01-06 22:52:47 +01:00
parent bda763725e
commit 021fc3cc7e
No known key found for this signature in database
26 changed files with 239 additions and 208 deletions

View file

@ -28,9 +28,9 @@ func (panel *UserPanel) routeUser(ctx context.Context) http.Handler {
userTemplate := panel.Dependencies.Custom.Template(userTemplate)
return &httpx.HTMLHandler[routeUserContext]{
Handler: func(r *http.Request) (ruc routeUserContext, err error) {
panel.Dependencies.Custom.Update(&ruc)
panel.Dependencies.Custom.Update(&ruc, r)
ruc.AuthUser, err = panel.Dependencies.Auth.UserOf(r)
return routeUserContext{}, err
return ruc, err
},
Template: userTemplate,
}