Reader transition page

This commit is contained in:
schroda
2024-12-03 18:00:46 +01:00
parent 7cf78e771a
commit fb31a92cd7
19 changed files with 423 additions and 59 deletions

View File

@@ -65,10 +65,11 @@ export const ReaderHotkeys = ({
CONTINUOUS_READING_MODE_TO_SCROLL_DIRECTION[readingMode.value],
readingDirection.value,
scrollElementRef.current,
openChapter,
ReaderScrollAmount.SMALL,
),
{ preventDefault: true },
[readingMode.value, readingDirection.value],
[readingMode.value, readingDirection.value, openChapter],
);
useHotkeys(
hotkeys[ReaderHotkey.SCROLL_FORWARD],
@@ -79,10 +80,11 @@ export const ReaderHotkeys = ({
CONTINUOUS_READING_MODE_TO_SCROLL_DIRECTION[readingMode.value],
readingDirection.value,
scrollElementRef.current,
openChapter,
ReaderScrollAmount.SMALL,
),
{ preventDefault: true },
[readingMode.value, readingDirection.value],
[readingMode.value, readingDirection.value, openChapter],
);
useHotkeys(hotkeys[ReaderHotkey.PREVIOUS_CHAPTER], () => openChapter('previous'), [openChapter]);
useHotkeys(hotkeys[ReaderHotkey.NEXT_CHAPTER], () => openChapter('next'), [openChapter]);