fix(devices): copy buttons via component method (copyFromId) under CSP build

This commit is contained in:
John O'Keefe committed 2026-10-25 18:14:44 -04:00
1 parent 6d01bd7971
commit 3b66b981be
13 files changed
+34 -27

No files matched your search

+2 -2
View File
@@ -111,7 +111,7 @@ templ Devices(user User, devices []handlers.DeviceInfo, pendingRegistrations []P
class="input text-xs font-mono"
/>
<button
@click={ "copyToClipboard(document.getElementById('sync-url-" + device.ID.String() + "').value, 'Kobo sync URL')" }
@click={ "copyFromId('sync-url-" + device.ID.String() + "', 'Kobo sync URL')" }
class="btn btn-primary text-xs px-3"
>
@Icon("copy", "h-4 w-4")
@@ -133,7 +133,7 @@ templ Devices(user User, devices []handlers.DeviceInfo, pendingRegistrations []P
class="input text-xs font-mono"
/>
<button
@click={ "copyToClipboard(document.getElementById('auth-token-" + device.ID.String() + "').value, 'Auth token')" }
@click={ "copyFromId('auth-token-" + device.ID.String() + "', 'Auth token')" }
class="btn btn-primary text-xs px-3"
>
@Icon("copy", "h-4 w-4")