MockMode: made global in templates; increase bort of navbar in mock mode

This commit is contained in:
2026-08-20 00:23:41 -06:00
parent f30d4a3140
commit 25615fabc6
4 changed files with 47 additions and 7 deletions
+11 -1
View File
@@ -170,6 +170,14 @@ func (s *webpageRouter) serveTemplate(c *gin.Context) (response.Response, error)
r := c.Request
ctx := r.Context()
id := auth.GetIdentity(ctx)
var mockMode bool
if id.Account != nil {
var err error
if mockMode, err = s.accts.GetMockMode(ctx, id.Account.AccountID); err != nil {
return nil, err
}
}
args := []any{
"Request",
@@ -183,10 +191,12 @@ func (s *webpageRouter) serveTemplate(c *gin.Context) (response.Response, error)
s.accts.WithContext(ctx),
"Etsy",
s.etsy.WithContext(ctx),
"MockMode",
mockMode,
// auth tooling
"Identity",
auth.GetIdentity(ctx),
id,
"Auth",
newTemplateAuthenticator(r),
}