From 37cb279a1572e94eda85673bf5992300b97a8b22 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sun, 22 Feb 2026 19:06:32 -0500 Subject: [PATCH] chore(templates): regenerate Go code after template changes Run templ generate to update *_templ.go files after admin header refactoring and template signature changes. --- templates/admin_library_templ.go | 11 +++-------- templates/admin_templ.go | 11 +++-------- templates/admin_users_templ.go | 30 +++++++++++++++--------------- 3 files changed, 21 insertions(+), 31 deletions(-) diff --git a/templates/admin_library_templ.go b/templates/admin_library_templ.go index 7037caa..24f9ef3 100644 --- a/templates/admin_library_templ.go +++ b/templates/admin_library_templ.go @@ -29,20 +29,15 @@ func AdminLibrary(user User) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Library Management - Bookhoard
← Back to Dashboard

Library Management

Manage libraries and configure media scanning

Libraries

Manage media libraries and their folders

Library Visibility

Control which libraries are visible to users

User Library Access

Manage individual user access to specific libraries

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
← Back to Dashboard

Library Management

Manage libraries and configure media scanning

Libraries

Manage media libraries and their folders

Library Visibility

Control which libraries are visible to users

User Library Access

Manage individual user access to specific libraries

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/templates/admin_templ.go b/templates/admin_templ.go index bd8ee4f..42a952c 100644 --- a/templates/admin_templ.go +++ b/templates/admin_templ.go @@ -29,20 +29,15 @@ func Admin(user User) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Admin Dashboard - Bookhoard

Dashboard

Overview of your Bookhoard library and settings

📖

Library

Manage your ebook collection

View Library
⚙️

Settings

Configure your preferences

Manage Settings

Quick Actions

Manage Folders
Add or remove scan directories
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "

Dashboard

Overview of your Bookhoard library and settings

📖

Library

Manage your ebook collection

View Library
⚙️

Settings

Configure your preferences

Manage Settings

Quick Actions

Manage Folders
Add or remove scan directories
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/templates/admin_users_templ.go b/templates/admin_users_templ.go index 243c409..818a017 100644 --- a/templates/admin_users_templ.go +++ b/templates/admin_users_templ.go @@ -8,7 +8,7 @@ package templates import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -func AdminUsers(users []User, adminCount int, currentUserID string) templ.Component { +func AdminUsers(currentUser User, users []User, adminCount int) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -29,11 +29,11 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Users - Bookhoard Admin") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Users - Bookhoard Admin") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = Header(User{Username: "Admin", Role: "admin"}, "/admin/users").Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = Header(currentUser, "/admin/users").Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -49,7 +49,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("user-" + user.ID) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 40, Col: 33} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 41, Col: 33} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -62,7 +62,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(user.Username) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 45, Col: 93} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 46, Col: 93} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -72,7 +72,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - if user.ID == currentUserID { + if user.ID == currentUser.ID { templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "You") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err @@ -85,7 +85,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(user.Email) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 55, Col: 76} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 56, Col: 76} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -108,7 +108,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("/api/auth/profile/" + user.ID) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 75, Col: 50} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 76, Col: 50} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -121,7 +121,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("#role-result-" + user.ID) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 77, Col: 48} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 78, Col: 48} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -154,7 +154,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs("role-result-" + user.ID) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 89, Col: 44} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 90, Col: 44} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -172,7 +172,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(user.CreatedAt.Format("2006-01-02")) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 95, Col: 104} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 96, Col: 104} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -185,7 +185,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("/admin/users/" + user.ID + "/profile-modal") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 101, Col: 63} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 102, Col: 63} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -208,7 +208,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon var templ_7745c5c3_Var10 string templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs("/api/auth/profile/" + user.ID) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 120, Col: 53} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 121, Col: 53} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) if templ_7745c5c3_Err != nil { @@ -221,7 +221,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon var templ_7745c5c3_Var11 string templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs("#user-" + user.ID) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 122, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/admin_users.templ`, Line: 123, Col: 41} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) if templ_7745c5c3_Err != nil { @@ -237,7 +237,7 @@ func AdminUsers(users []User, adminCount int, currentUserID string) templ.Compon return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }