9 Commits

Author SHA1 Message Date
Joseph Milazzo
eb88967545
Webtoon Reader Fixup (#405)
* Navigate users to library page instead of home to prevent history block.

* Cleaned up the Contributing to describe new code structure

* Fixed a critical bug for how we find files for a chapter download (use ChapterId for lookup, not MangaFile.Id). Refactored how downloading works on the UI side to use the backend's filename whenever possible, else provide a custom name (and use backend's extension) for bundled downloads.

* Fixed a bug where scroll intersection wasn't working on books without a table of content, even though it should have.

* If user is using a direct url and hits an authentication guard, cache the url, allow authentication, then redirect them to said url

* Added a transaction for bookmarking due to a rare case (in dev machines) where bookmark progress can duplicate

* Re-enabled webtoon preference in reader settings. Refactored gotopage into it's own, dedicated handler to simplify logic.

* Moved the prefetching code to occur whenever the page number within infinite scroller changes. This results in an easier to understand functioning.

* Fixed isElementVisible() which was not properly calculating element visibility

* GoToPage going forwards is working as expected, going backwards is completly broken

* After performing a gotopage, make sure we update the scrolling direction based on the delta.

* Removed some stuff thats not used, split the prefetching code up into separate functions to prepare for a rewrite.

* Reworked prefetching to ensure we have a buffer of pages around ourselves. It is not fully tested, but working much better than previous implementation. Will be enhanced with DOM Pruning.

* Cleaned up some old cruft from the backend code

* Cleaned up the webtoon page change handler to use setPageNum, which will handle the correct prefetching of next/prev chapter

* More cleanup around the codebase

* Refactored the code to use a map to keep track of what is loaded or not, which works better than max/min in cases where you jump to a page that doesn't have anything preloaded and loads images out of order

* Fixed a bad placement of code for when you are unauthenticated, the code will now redirect to the original location you requested before you had to login.

* Some cleanup. Fixed the scrolling issue with prev page, spec seems to not work on intersection observer. using 0.01 instead of 0.0.
2021-07-19 18:55:01 -05:00
Joseph Milazzo
16a77fa8d6
Download Support (#298)
* Implemented the ability to download files (series, volume, chapter)

* Added RBS checks to ensure user is either an admin or has download role

* Added the ability to change a users feature RBS. Changed the Role seed to use reflection
2021-06-10 07:47:35 -05:00
Joseph Milazzo
d73bd22db2 Some code cleanup 2021-03-23 12:22:47 -05:00
Joseph Milazzo
f77de66d97 ContinueReading has been pulled from UI. The query doesn't work and no longer sure I need. 2021-03-20 12:44:18 -05:00
Joseph Milazzo
e60d84a2c8 Cleanup 2021-03-17 14:31:17 -05:00
Joseph Milazzo
0a85555f38 Temp commit to record attempts. Stream APIs are implemented and working. Added some new test cases based on deployed Kavita server testing. 2021-03-17 14:29:50 -05:00
Joseph Milazzo
af35d8aad5 Cleanup of lazy loading code. Made some DTOs use init rather than set to keep it clean. 2021-03-12 13:20:08 -06:00
Joseph Milazzo
d3b42081cb Enable response compression (br and gzip) for images and static assets. After we scan a library, kick of a cleanup of cache to ensure if archives were changed, the cache is cleared too. 2021-03-12 10:37:42 -06:00
Joseph Milazzo
53e85317f9 Refactored DB to be Series->Volumes->Chapters instead. All functionality that previously worked still works. Cleanup still needed. 2021-02-01 09:29:11 -06:00