fix(web): banner highlight delete; retention wording states the days

The book-detail banner's highlight rows gain Delete (tombstoned
server-side, restorable from the Deleted modal — same as the reader
drawers already offered). The deleted-annotations modal now says the
retention in plain language — 'kept for 30 days' from the
annotation_tombstone_ttl_days tunable (threaded through BookDetail →
NotesHighlightsModal; 1-day singular and retention-disabled variants
handled) — instead of referencing a settings name a reader cannot see.
This commit is contained in:
John O'Keefe committed 2026-10-05 12:15:45 -04:00
1 parent 5275f2ba38
commit f45adc6362
7 files changed
+502 -444

No files matched your search

+17
View File
@@ -311,6 +311,23 @@ Alpine.data("bookDetail", () => {
showToast("Could not delete the note", "error");
}
},
async deleteBannerHighlight(row: AnnotationRow) {
if (row.kind !== "highlight") return;
const mediaId = getMediaId();
const hlId = row.key.slice("hl-".length);
try {
const resp = await fetch(`/api/media-items/${mediaId}/highlights/${hlId}`, {
method: "DELETE",
headers: { Authorization: getAuthHeader() },
});
if (!resp.ok) throw new Error(String(resp.status));
// Tombstoned server-side: restorable from the Deleted modal.
showToast("Highlight deleted — restorable from Deleted", "success");
await this.fetchBannerAnnotations();
} catch (_e) {
showToast("Could not delete the highlight", "error");
}
},
showExportDialog(): void {
if (this.bannerRows.length === 0) return;
this.annotationsExportOpen = true;