pldubouilh / gossa

🎶 a fast and simple multimedia fileserver
MIT License
883 stars 72 forks source link

Previous picture #42

Closed aeeq closed 4 years ago

aeeq commented 4 years ago

Can I browse Previous picture without keyboard,such as on phone,now there's only the Next?

pldubouilh commented 4 years ago

~there's no way to do that now, had a look some time ago but it seems there's no clean api for that in js, it has to be implemented manually :(~ ~I agree it's not ideal though, I'll think about it~

ChangePlaces commented 4 years ago

how about storing the list of files as a json string / or an array in the html output of a directory, and passing that into whatever js you're using to view the image. I assume the whatever image overlay library / lightbox library you're using has a next / previous feature.

pldubouilh commented 4 years ago

there's no library whatsoever, everything's finely handcrafted haha :)

the image list and image overlay are in place already, it's just about reading the swipe event in js, and reacting accordingly.

pldubouilh commented 4 years ago

actually js swipe events are absolutely available, I was looking at the wrong event on MDN. Swipe picture navigation is implemented in v0.1.3 :+1:

aeeq commented 4 years ago

good!