fix(devices): copy buttons via component method (copyFromId) under CSP build
This commit is contained in:
1 parent
6d01bd7971
commit
3b66b981be
13 files changed
+34
-27
No files matched your search
@@ -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;
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user