From 0f225c39b98a10917f516069117c5d59795cec2c Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 2 Jun 2026 19:46:29 -0400 Subject: [PATCH] fix(templ): correct @click attribute interpolation syntax Templ requires Go expression interpolation for dynamic attributes, not string embedding. Change from @click="func('{ id }')" to @click={ "func('" + id + "')" } for device ID and registration ID buttons. --- templates/devices.templ | 8 +- templates/devices_templ.go | 322 +++++++++++++++++++++---------------- 2 files changed, 191 insertions(+), 139 deletions(-) diff --git a/templates/devices.templ b/templates/devices.templ index aaee178..cac4412 100644 --- a/templates/devices.templ +++ b/templates/devices.templ @@ -58,10 +58,10 @@ templ Devices(user User, devices []handlers.DeviceInfo, pendingRegistrations []P } - + 📚 - + ⚙️ @@ -175,10 +175,10 @@ templ Devices(user User, devices []handlers.DeviceInfo, pendingRegistrations []P
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\" class=\"p-2 hover:opacity-80 rounded\" style=\"color: var(--text-secondary); background-color: var(--bg-primary);\">📚
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var5 string + templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(device.DeviceType) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/devices.templ`, Line: 70, Col: 89} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "
DEVICE SYNC CONFIGURATION
Paste this URL into Kobo's api_endpoint setting
api_endpoint
Enter this token in the KOReader plugin settings
⚠️ Old token will immediately stop working
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "🔄 Regenerate Token
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var12 string + templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(reg.DeviceType) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/devices.templ`, Line: 174, Col: 27} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, " - Expires in ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var13 string + templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(reg.ExpiresAt) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `templates/devices.templ`, Line: 174, Col: 58} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "
Enter your device's unique identifier
Allow this device to sync reading progress
Automatically sync changes
Configure how collections are displayed on this device
Display book covers in collection views
Display progress indicators for books
Loading mappings...
Name of the shelf on this device