Commit graph

12 commits

Author SHA1 Message Date
Frédéric Guillot
168a870c02 Move internal packages to an internal folder
For reference: https://go.dev/doc/go1.4#internalpackages
2023-08-10 20:29:34 -07:00
dzaikos
7d252ea45b Add swipe as option for gesture navigation between entries.
* Refactor `TouchHandler` to handle double-tap and swipe gestures.
  * Renamed existing `onTouch` JavaScript methods to `onItemTouch` and
    added `onContentTouch` methods for swipe gesture.
  * Refactor double-tap. It's now a method in `TouchHandler` versus
    anonymous functions in `listen()` method.
* Updated CSS classes.
  * Added `touch-action` CSS for `.entry-content`.
  * Renamed CSS classes for adding events in `TouchHandler`.
* Updated users settings to replace checkbox for double tap with select
  for none, double tap, or swipe.
* Added database migrations for new gesture_nav option.
  * Rename `users.double_tap` to `users.gesture_nav` and migrate
    existing user settings.
* Updated translation files. (Non-English updated with Google
  Translate.)

Resolves #1449, closes #1495
2023-03-28 18:00:57 -07:00
Frédéric Guillot
2e047dff98 Add option to enable or disable double tap 2023-01-14 16:59:52 -08:00
nyanpasu64
b6c368c39c Disable double-tap mobile gesture if swipe gesture is disabled
Fixes #441.
2022-12-06 20:34:15 -08:00
dzaikos
ec2b911881 Make swipe gestures feel more natural.
Removes opacity transition when swiping an article read/unread.

Adds "resistance" to the swiped entry when the 75px threshold is
reached.

Fixes an issue in which a swiped article couldn't be moved <15px.
2022-04-13 21:17:53 -07:00
Jacob Duba
7a1429bcc1
Fix regression: reset touch-item if not in /unread 2022-01-27 19:39:35 -08:00
Jacob Duba
3dda84bf9a
Do not reset touch-item if successfully swiped 2022-01-15 10:47:25 -08:00
Frédéric Guillot
2b6e17c1ef Refactoring of Javascript code 2019-07-17 20:34:11 -07:00
3ddysan
fc473f1d11 Add double tap detection for next/previous page navigation 2019-03-11 20:23:19 -07:00
Dave Z
3f31744911 Prevent vertical scrolling on swipe 2018-07-17 18:48:56 -07:00
Frédéric Guillot
3bdb9251da Use passive event listeners for touch events
Avoid this warning in Chrome console: https://www.chromestatus.com/feature/5745543795965952
2018-07-10 20:41:27 -07:00
Frédéric Guillot
53deb0b8cd Refactor assets bundler and split Javascript files 2018-07-05 22:18:51 -07:00