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

+3
View File
@@ -222,6 +222,9 @@ Alpine.data("bookDetail", () => {
hideProgressSyncModal,
hideNotesModal,
triggerCoverUpload,
readerLocHref(row: { loc?: string }): string {
return `/readers/${this.bannerMediaId}?loc=${encodeURIComponent(row.loc ?? "")}`;
},
bannerEditHasText(): boolean {
return (this.bannerEditText || "").trim().length > 0;
},
+4
View File
@@ -558,6 +558,10 @@ function setupEventDelegation(): void {
Alpine.data("devices", () => ({
approveDevice,
copyToClipboard,
copyFromId(id: string, label: string) {
const el = document.getElementById(id) as HTMLInputElement | null;
if (el) this.copyToClipboard(el.value, label);
},
deleteMapping,
editMapping,
getDeviceIcon,