+
+
+
+
+
+
+ `;
+ document.body.appendChild(sheet);
+ currentNoteBottomSheet = sheet;
+
+ const textarea = sheet.querySelector('.note-bottom-sheet-textarea');
+ textarea.value = h?.note || '';
+
+ function commit() {
+ _commitNoteEdit(h, pending, textarea.value.trim());
+ dismissNoteBottomSheet();
+ if (readerAnnotationsMarginOpen) _repositionMarginMarkers();
+ }
+ function cancel() { dismissNoteBottomSheet(); }
+
+ sheet.querySelector('[data-nbs-save]').addEventListener('click', commit);
+ sheet.querySelector('[data-nbs-cancel]').addEventListener('click', cancel);
+ sheet.querySelector('.note-bottom-sheet-backdrop').addEventListener('click', cancel);
+ textarea.addEventListener('keydown', e => {
+ if (e.key === 'Escape') { e.stopPropagation(); cancel(); }
+ });
+
+ requestAnimationFrame(() => {
+ sheet.classList.add('open');
+ textarea.focus();
+ });
+}
+
// Same plain-text export as exportAnnotations(), but callable straight from the
// book list (no open reader, so no live DOM/TOC to resolve percent position or
// chapter titles against — falls back to the raw chapterSrc path and orders by
@@ -6073,7 +6184,10 @@ function openRadioSidebar() {
_readerContentEl.addEventListener('mouseup', handleReaderSelection);
_readerContentEl.addEventListener('touchend', e => {
const target = e.target;
- setTimeout(() => handleReaderSelection({target}), 50);
+ const touch = e.changedTouches && e.changedTouches[0];
+ const clientX = touch ? touch.clientX : undefined;
+ const clientY = touch ? touch.clientY : undefined;
+ setTimeout(() => handleReaderSelection({target, clientX, clientY}), 50);
});
}
diff --git a/static/js/sw.js b/static/js/sw.js
index 41ab2c4..a18e60a 100644
--- a/static/js/sw.js
+++ b/static/js/sw.js
@@ -2,7 +2,7 @@
* diora service worker — caches the app shell for offline use.
*/
-const CACHE = 'diora-v31';
+const CACHE = 'diora-v32';
const PODCAST_CACHE = 'diora-podcast-v1';
const SHELL = [
'/static/css/app.css',
diff --git a/templates/radio/player.html b/templates/radio/player.html
index 2f36e86..931db3e 100644
--- a/templates/radio/player.html
+++ b/templates/radio/player.html
@@ -348,6 +348,7 @@