feat(web): add mobile swipe gestures to image gallery

Install react-swipeable and wire useSwipeable onto the main image
container — left-swipe advances to next image, right-swipe goes back.
Gestures only activate when there are multiple images; desktop button
navigation is fully preserved.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-22 23:31:31 +07:00
parent e798468e4c
commit 7e2ccdfb7c
4 changed files with 241 additions and 94 deletions

9
pnpm-lock.yaml generated
View File

@@ -168,6 +168,9 @@ importers:
class-validator:
specifier: ^0.15.1
version: 0.15.1
cockatiel:
specifier: ^3.2.1
version: 3.2.1
cookie-parser:
specifier: ^1.4.7
version: 1.4.7
@@ -4043,6 +4046,10 @@ packages:
resolution: {integrity: sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==}
engines: {node: '>=0.10.0'}
cockatiel@3.2.1:
resolution: {integrity: sha512-gfrHV6ZPkquExvMh9IOkKsBzNDk6sDuZ6DdBGUBkvFnTCqCxzpuq48RySgP0AnaqQkw2zynOFj9yly6T1Q2G5Q==}
engines: {node: '>=16'}
color-convert@2.0.1:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
@@ -11440,6 +11447,8 @@ snapshots:
cluster-key-slot@1.1.2: {}
cockatiel@3.2.1: {}
color-convert@2.0.1:
dependencies:
color-name: 1.1.4