kthoom
kthoom copied to clipboard
Mobile support
This actually seems to work well already on my iPhone. Just need a slightly better UI for it.
I may attempt this myself as I haven’t done much web front end dev
That would be great! As far as I had thought, it would be nice to:
- make touch swiping work (Wheel events are listened to for trackpad swiping here: https://github.com/codedread/kthoom/blob/master/code/book-viewer.js#L56)
- make the UI display well on mobile devices (at least the menubar and reading stack tray should not require pinch-zooming!)
That's about it - everything else seems to work.
Hi, Just add support of touch swiping here https://github.com/barais/kthoom/commit/3b4fb9e95b81526dd8240fc949ed9f4d9ae2b5a9 Please tell me if it could be relevant
Regards
Hi again - yes, this looks promising. I will take a look tonight. Does it properly work when you rotate the images (swipe down would become "next page" when rotated counter-clockwise)?
Other things to fix:
- buttons should not overflow and need to fit
- probably need to disable rotations in mobile, the device controls that on mobile
- all buttons need to be tappable (close buttons in reading stack are too small)
- hide the shortcut key / help screen?
I just keep putting some ideas for the mobile version here https://olivier.barais.fr/kthoom/index.html if you want to test.
- Hidden some buttons in Full Screen Mode
- Support PWA offline and installable mode through service worker API (useful for chromebook), you can use kthoom as an installable app.
- support swipe mode (small bug on screeen rotation for swipping to next page in swiping from bottom to top when you are at the end of a page after rotating the screen
- put the full screen button on top right corner through css
Do not hesitate to tell me if some feature could be useful, I can try to do clean pull request or do not hesitate to take some part of the code that could be useful in looking the commits.
Thanks for your great project.
Regards
Thanks! Can you create a pull clean request for just the offline part (the service worker)? I looked at your code and tried out your site.
- It actually fails to load comic books offline because you've missed caching some files (bitjs/archive/unzip.js, bitjs/archive/unrar.js and bitjs/archive/untar.js) which are fetched and invoked as a Web Worker when you try to load a comic book
- Also, can you change to const/let instead of var?
- Also, can you use arrow functions where possible?
- Finally, can you use template strings for printing?
All the latter three ES features are available in all browsers that support service workers.