fix(web): complete the CSP-build migration across remaining surfaces

- audio reader: scrub/volume/speed/genre-tick bindings converted to
  component methods (onScrubInput, setVolumeFromEvent,
  applyDefaultSpeedFromSelect, volumeLabel, railTickStyle,
  isSkipActive/isSpeedActive) — these used Number/Math/String globals
  that the CSP evaluator cannot resolve
- fmtTime restored to the audioReader component: the unexport pass
  had ripped it from the Alpine.data object (time displays were dead)
- book detail: cover-upload click and banner edit validation moved to
  component methods (triggerCoverUpload, bannerEditHasText)
- admin/docs/index components: init() hooks for their x-init chains
- CSP header: 'unsafe-eval' dropped — the CSP build needs no eval
- e2e spec: replace test.info().annotate (unavailable in this
  Playwright version) with console logging
This commit is contained in:
John O'Keefe committed 2026-10-25 17:22:40 -04:00
1 parent eb57b7208b
commit 09545ca5e1
16 files changed
+249 -234

No files matched your search

+8
View File
@@ -55,6 +55,10 @@ function hideMetadataEditor(): void {
if (modal) modal.classList.add("hidden");
}
function triggerCoverUpload(): void {
document.getElementById("cover-upload-input")?.click();
}
function collectFormData(editorTags: string[]): Record<string, unknown> {
const modal = document.getElementById("metadata-editor-modal");
if (!modal) return {};
@@ -217,6 +221,10 @@ Alpine.data("bookDetail", () => {
showProgressSyncModal,
hideProgressSyncModal,
hideNotesModal,
triggerCoverUpload,
bannerEditHasText(): boolean {
return (this.bannerEditText || "").trim().length > 0;
},
async toggleAnnotationsBanner() {
this.annotationsBannerOpen = !this.annotationsBannerOpen;