Skip to content

Commit

Permalink
v0.5.4 - Double Page Layout, Estimated Reading Time, a new PDF Reader…
Browse files Browse the repository at this point in the history
… and Infinite Scroll?! (#1344)

* Angular Upgrade (#1059)

* Upgraded to Angular 12

* Bump ng-bootstrap for upgrade

* Angular 13 upgrade, ng-bootstrap bump

* Angular 13 upgrade (broken)

* Angular 13 upgrade. CSS is broken completely

* Angular 13 upgrade is complete.

* Bump versions by dotnet-bump-version.

* Added beta disclaimer (#1065)

* Bump versions by dotnet-bump-version.

* Auto approve migration emails if the password is correct. Change Email Link dump to Critical to ensure it makes it into the logs. (#1069)

* Bump versions by dotnet-bump-version.

* Adding discord roles (#1070)

* Adding discord roles

# Added
- Added: Added Discord roles to automated build discord notification.

* update

* Bump versions by dotnet-bump-version.

* Custom Theme Support (#1077)

* Started the migration to bootstrap 5. Introduced a breakpoint system that bootstrap reflects for our screens.

* sr only migrated

* mr/ml -> me/ms

* pl/pr -> ps/pe

* btn-block

* removed input-group-append

* Added form-label to all labels

* Added some style overrides for inputs

* Replaced form-group with mb-3

* Ignore journal files

* Update media to d-flex/flex-grow-1

* Fixed reading list detail page

* For develop builds, don't inline critical styles

* Fixed some downstream security issues

* Fixed a layout issue in series detail

* Fixed issue with btn-light not having background color. Updated layout for series detail metadata

* Cleaned up nav search

* Laid out the organization for custom theme components. Update _inputs.scss with variable overrides and depending on theme, it will just work.

* Lots of theming work

* Added inputs to the theme page

* Login and input placeholder changes

- Fixed login screen centering issue on all devices
- Changed the format of the login screen
- Change the input placeholder color

* Added checkbox styles

* Refactored tagbadges and removed some ngdeep selectors

* Added nav bar component and refactored some styles into event widget

* Cleaned nav events again and made dedicated popover body

* Finished pagination component

* Fixed up some styles with buttons

* refactored dropdown component

* Update accordion component

* Refactored breadcrumbs and rating star. Fixed a missing style for cards

* Fixed some styling issues on person badge, added modal component, and some global styles

* Finished moving everything within dark to component files

* Fixed up filter buttons, move card styles into a component theme, fixed slider style

* Refactored library card and grouped typeahead

* Updated normal typeahead component and reduced amount of ngdeep selector

* Refactored grid breakpoints to be available by css variable, but it's hardcoded into the app

* Ensure breakpoints are defined per theme

* Fixed up some styling overrides and customization for nav links and alt button

* Removed some deep styles, moved css out of splash container and brough back labels for login page

* Finished css variable refactor

* Refactored all the theme variable definitions into files for each theme.

* Added back bootstrap overrides

* Added a note about bootstrap theme colors being not-possible to swap out at runtime

* Cleaned up some dead code

* Implemented the ability to set a custom theme on the site. Cleaned up misc code throughout.

* Additional changes

- Fixed nav where "kavita" was not hiding correctly on small viewports
- Fixed search bar to make the behavior more consistent
- Fixed accordion buttons
- Changed accordion buttons to be more responsive
- Added radio button colors
- Fixed radios on theme test page
- Changed login and reset password card layouts to be more consistent.
- Added primary color shade for when darker shading is needed.

* Built a basic site, allow the user to apply different themes, refactored nav service code out.

* Implemented the ability update a user's theme

* Added unit tests for Scan and Get Content in SiteThemeService.

* Fixed a bug in the login code and Pref code which wasn't joining on SiteTheme table. Wrote Unit tests and the UI component to manage current theme.

* Implemented scan so that it manages custom themes with unit tests

* Component updates

- Repositioning style ordering
- Adding indicator override
- Adding select styles

* SignlaR integration, some fixes when creating custom entities, one single migration. Just login functionality left.

* More ui updated

- Added .no-hover to prevent hover on elements where not needed
- Changed all selects I could find to appropriate class
- Changed up nav tabs to work more like bootstrap tabs than pills
- Added padding to top of some containers to make styles consistent
- Added ability to change navbar fontawesome icon colors
- removed some unecessary inline styling
- Changed radio button to appropriate class
- Toned down primate color, a bit too bright for dark theme.
- Added ability to change button fontawesome icon color

* nav-tab fix for series-detail

* Added themes folder to gitignore

* Adding card overlay

* Fixing up light theme

* Everything is done. Only bug is that color-scheme isn't being set properly from css variable.

* Checkboxes have pointer by default. Confirm/Confirm email use default (dark) theme by default

* Fixed an error where color-scheme wasn't reflecting correctly on themes on first load

* Fixed user preferences not available on login

* Changing dual radios to switches and color tweaks

* disabled primary APCA fix

* button APCA fixes

* Fixed some timing issues with first load and image service

* Fixed swiper issues from upgrade

* Changed themes to be scss files again and adjusted Seed code

* Migrated carousel to css variables. Fixed a broken animation for search.

* Cleaned up some backend smells

* Fixed white border outline on nav tabs, added some variables for header

* Nav bar has been css variable-ified

* Added some basic eink stuff to make the app useable

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Fix an issue for first time running theme code, theme will not be available (#1081)

* Bump versions by dotnet-bump-version.

* Theme Cleanup (#1089)

* Fixed e-ink theme not properly applying correctly

* Fixed some seed changes. Changed card checkboxes to use our themed ones

* Fixed recently added carousel not going to recently-added page

* Fixed an issue where no results found would show when searching for a library name

* Cleaned up list a bit, typeahead dropdown still needs work

* Added a TODO to streamline series-card component

* Removed ng-lazyload-image module since we don't use it. We use lazysizes

* Darken card on hover

* Fixing accordion focus style

* ux pass updates

- Fixed typeahead width
- Fixed changelog download buttons
- Fixed a select
- Fixed various input box-shadows
- Fixed all anchors to only have underline on hover
- Added navtab hover and active effects

* more ux pass

- Fixed spacing on theme cards
- Fixed some light theme issues
- Exposed text-muted-color for theme card subtitle color

* UX pass fixes

- Changed back to bright green for primary on dark theme
- Changed fa icon to black on e-ink

* Merged changelog component

* Fixed anchor buttons text decoration

* Changed nav tabs to have a background color instead of open active state

* When user is not authenticated, make sure we set default theme (dark)

* Cleanup on carousel

* Updated Users tab to use small buttons with icons to align with Library tab

* Cleaned up brand to not underline, removed default link underline on hover in dropdown and pill tabs

* Fixed collection detail posters not rendering

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Event Widget Update (#1098)

* Took care of some notes in the code

* Fixed an issue where Extra might get flagged as special too early, if in a word like Extraordinary

* Moved Tag cleanup code into Scanner service. Added a SplitQuery to another heavy API. Refactored Scan loop to remove parallelism and use async instead.

* Lots of rework on the codebase to support detailed messages and easier management of message sending. Need to take a break on this work.

* Progress is being made, but slowly. Code is broken in this commit.

* Progress is being made, but slowly. Code is broken in this commit.

* Fixed merge issue

* Fixed unit tests

* CoverUpdate is now hooked into new ProgressEvent structure

* Refactored code to remove custom observables and have everything use standard messages$

* Refactored a ton of instances to NotificationProgressEvent style and tons of the UI to respect that too. UI is still a bit buggy, but wholistically the work is done.

* Working much better. Sometimes events come in too fast. Currently cover update progress doesn't display on UI

* Fixed unit tests

* Removed SignalREvent to minimize internal event types. Updated the UI to use progress bars. Finished SiteThemeService.

* Merged metadata refresh progress events and changed library scan events to merge cleaner in the UI

* Changed RefreshMetadataProgress to CoverUpdateProgress to reflect the event better.

* Theme Cleanup (#1089)

* Fixed e-ink theme not properly applying correctly

* Fixed some seed changes. Changed card checkboxes to use our themed ones

* Fixed recently added carousel not going to recently-added page

* Fixed an issue where no results found would show when searching for a library name

* Cleaned up list a bit, typeahead dropdown still needs work

* Added a TODO to streamline series-card component

* Removed ng-lazyload-image module since we don't use it. We use lazysizes

* Darken card on hover

* Fixing accordion focus style

* ux pass updates

- Fixed typeahead width
- Fixed changelog download buttons
- Fixed a select
- Fixed various input box-shadows
- Fixed all anchors to only have underline on hover
- Added navtab hover and active effects

* more ux pass

- Fixed spacing on theme cards
- Fixed some light theme issues
- Exposed text-muted-color for theme card subtitle color

* UX pass fixes

- Changed back to bright green for primary on dark theme
- Changed fa icon to black on e-ink

* Merged changelog component

* Fixed anchor buttons text decoration

* Changed nav tabs to have a background color instead of open active state

* When user is not authenticated, make sure we set default theme (dark)

* Cleanup on carousel

* Updated Users tab to use small buttons with icons to align with Library tab

* Cleaned up brand to not underline, removed default link underline on hover in dropdown and pill tabs

* Fixed collection detail posters not rendering

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Tweaked some of the emitting code

* Some css, but pretty bad. Robbie please save me

* Removed a todo

* styling update

* Only send filename on FileScanProgress

* Some console.log spam cleanup

* Various updates

* Show events widget activity based on activeEvents

* progress bar color updates

* Code cleanup

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Scanner event hub fix (#1099)

* Scanner event hub fix

- Fixed an issue where the scanner would error when adding a new series because the series didn't have a library name yet. (develop)

* Removing library.type

* Bump versions by dotnet-bump-version.

* Workflow update to add nightly versions (#1100)

# Changed
- Changed: Changed automated workflow to release individual nightly versions on dockerhub

* Bump versions by dotnet-bump-version.

* Updating GA to parse version (#1101)

* Bump versions by dotnet-bump-version.

* GA Fixes (#1103)

**Strictly Repo Changes**
# Fixed
- Fixed: Fixed an issue where patch version was not being added to docker tag.

* Bump versions by dotnet-bump-version.

* Fixed specials being misaligned (#1106)

# Fixed
- Fixed: Fixed issue with specials not being properly aligned (develop)

* Bump versions by dotnet-bump-version.

* Bugfix/ux pass 2 (#1107)

* Adding margin bottom to series detail tabs

* Styling tag badges with green on dark

- Added 3 new css vars

* Removing underline from readmore

* Fixing see more to be on one line

* adding gutter to see more

* Changing queue toasts to info

* adding api key tooltip

* Updating active accordion on user preference.

* Fixing search bar and close btn position

* Fixed a bug where entering book reader in dark mode then closing out, would leave you in a broken white state.

* Fixed broken wiki links

Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>

* Bump versions by dotnet-bump-version.

* Bump versions by dotnet-bump-version.

* Bump versions by dotnet-bump-version.

* Series Detail Refactor (#1118)

* Fixed a bug where reading list and collection's summary wouldn't render newlines

* Moved all the logic in the UI for Series Detail into the backend (messy code). We are averaging 400ms max with much optimizations available. Next step is to refactor out of controller and provide unit tests.

* Unit tests for CleanSpecialTitle

* Laid out foundation for testing major code in SeriesController.

* Refactored code so that read doesn't need to be disabled on page load. SeriesId doesn't need the series to actually load.

* Removed old property from Volume

* Changed tagbadge font size to rem.

* Refactored some methods from SeriesController.cs into SeriesService.cs

* UpdateRating unit tested

* Wrote unit tests for SeriesDetail

* Worked up some code where books are rendered only as volumes. However, looks like I will need to use Chapters to better support series_index as floats.

* Refactored Series Detail to change Volume Name on Book libraries to have book name and series_index.

* Some cleanup on the code

* DeleteMultipleSeries test is hard. Going to skip.

* Removed some debug code and make all tabs Books for Book library Type

* Bump versions by dotnet-bump-version.

* Tachiyomi Bugfix (#1119)

* Updated the dependencies for .NET 6.0.2

* Fixed a bad prev chapter logic where we would bleed into chapters from last volume instead of specials.

* Fixed the get prev chapter code to properly walk the order according to documentation and updated some bad test cases

* Bump versions by dotnet-bump-version.

* Series index fix (#1120)

* Series index fix

# Fixed
- Fixed: Fixed an issue where epub series with index = 0 would be hidden on series detail page.

* Removing unnecessary conditional

* Bump versions by dotnet-bump-version.

* Misc Bugfixes (#1123)

* Fixed a bug where ComicInfo Count can be a float and we threw a parse error.

* Fixed a bug in download bookmarks which didn't properly create the filepaths for copying. Refactored into a service with a unit test.

In Scanner, repull genres, people and tags between chunk saves to ensure no unique constraint issues.

* Fixed a bug where card detail layout wouldn't refresh the library name on the card between pages

* Fixed an issue where a check to scrolling page back to top was missing in manga reader

* Fixed a bug where cleaning up collection tags without Series was missing after editing a Series.

* Cleaned up the styles for cover chooser

* Added Regex support for "Series 001 (Digital) (somethingwith1234)" and removed support for "A Compendium of Ghosts - 031 - The Third Story_ Part 12" due to complexity in parsing.

* Fixed a miscommunication on how Tachiyomi needs the API MarkChaptersUntilAsRead implemented. Now 0 chapter volumes will be marked.

* Removed unneeded DI

* Bump versions by dotnet-bump-version.

* CopyFilesToDirectory will now allow for one duplicate copy over and put (2) (#1126)

* Bump versions by dotnet-bump-version.

* Stablize the Styles (#1128)

* Fixed a bug where adding multiple series to reading list would throw an error on UI, but it was successful.

* When a series has a reading list, we now show the connection on Series detail.

* Removed all baseurl code from UI and not-connected component since we no longer use it.

* Fixed tag badges not showing a border. Added last read time to the series detail page

* Fixed up error interceptor to remove no-connection code

* Changed implementation for series detail. Book libraries will never send chapters back. Volume 0 volumes will not be sent in volumes ever. Fixed up more renaming logic on books to send more accurate representations to the UI.

* Cleaned up the selected tab and tab display logic

* Fixed a bad where statement in reading lists for series

* Fixed up tab logic again

* Fixed a small margin on search backdrop

* Made badge expander button smaller to align with badges

* Fixed a few UIs due to .form-group and .form-row being removed

* Updated Theme component page to help with style testing

* Added more components to theme tester

* Cleaned up some styling

* Fixed opacity on search item hover

* Bump versions by dotnet-bump-version.

* Hacked in code so that we render an image instead of canvas for fit to screen to try out. (#1131)

* Bump versions by dotnet-bump-version.

* Metadata Editing from the UI! (#1135)

* Added the skeleton code for layout, hooked up Age Rating, Publication Status, and Tags

* Tweaked message of Scan service to Finished scan of to better indicate the total scan time

* Hooked in foundation for person typeaheads

* Fixed people not populating typeaheads on load

* For manga/comics, when parsing, set the SeriesSort from ComicInfo if it exists.

* Implemented the ability to override and create new genre tags. Code is ready to flush out the rest.

* Ability to update metadata from the UI is hooked up. Next is locking.

* Updated typeahead to allow for non-multiple usage. Implemented ability to update Language tag in Series Metadata.

* Fixed a bug in GetContinuePoint for a case where we have Volumes, Loose Leaf chapters and no read progress.

* Added ETag headers on Images to allow for better caching (bookmarks and images in manga reader)

* Built out UI code to show locked indication to user

* Implemented Series locking and refactored a lot of styles in typeahead to make the lock setting work, plus misc cleanup.

* Added locked properties to dtos. Updated typeahead loading indicator to not interfere with close button if present

* Hooked up locking flags in UI

* Integrated regular field locking/unlocking

* Removed some old code

* Prevent input group from wrapping

* Implemented some basic layout for metadata on volume/chapter card modal. Refactored out all metadata from Chapter object in terms of UI and put into a separate call to ensure speedy delivery and simplicity of code.

* Refactored code to hide covers section if not an admin

* Implemented ability to modify a chapter/volume cover from the detail modal

* Removed a few variables and change cover image modal

* Added bookmark to single chapter view

* Put a temp fix in for a ngb v12 z-index bug (reported). Bumped ngb to 12.0 stable and fixed some small rendering bugs

* loading buttons ftw

* Lots of cleanup, looks like the story is finished

* Changed action name from Info to Details

* Style tweaks

* Fixed an issue where Summary would assume it's locked due to a subscription firing on setting the model

* Fixed some misc bugs

* Code smells

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Manga Reader Refresh (#1137)

* Refactored manga reader to use a regular image element for all cases except for split page rendering

* Fixed a weird issue where ordering of routes broke redireciton in one case.

* Added comments to a lot of the enums and refactored READER_MODE to be ReaderMode and much more clearer on function.

* Added bookmark effect on image renderer

* Implemented keyboard shortcut modal

* Introduced the new layout mode into the manga reader, updated preferences, and updated bookmark to work for said functionality. Need to implement renderer now

* Hooked in ability to show double pages but all the css is broken. Committing for help from Robbie.

* Fixed an issue where Language tag in metadata edit wasn't being updated

* Fixed up some styling on mobile for edit series detail

* Some css fixes

* Hooked in ability to set background color on reader (not implemented in reader). Optimized some code in ArchiveService to avoid extra memory allocations.

* Hooked in background color, generated the migration

* Fixed a bug when paging to cover images, full height would be used instead of full-width for cover images

* New option in reader to show screen hints (on by default). You can disable in user preferences which will stop showing pagination overlay hints

* Lots of fixes for double rendering mode

* Bumped the amount of cached pages to 8

* Fixed an issue where dropdowns weren't being locked on form manipulation

* Bump versions by dotnet-bump-version.

* On Deck tweaks + Bugfixes (#1141)

* Tweaked the On deck to only look for series that have progress in past 30 days. This number is just to test it out, it will be configurable later. Tweaked the layout of the dashboard to remove a redundant section.

* Fixed a bug where archives with __MACOSX/ inside would break the reader during flattening.

* Fixed a bug where confirm service rejection should have resolved as false.

* Fixed an issue with checking if server is accessible with loopback and local ips

* Bump versions by dotnet-bump-version.

* Manga Reader Shakeout (#1142)

* Fixed a unit test in ArchiveService

* Image scaling fixes

* removing test

* Added new layout mode (enum only) and cleaned up manga reader and wrote extra documentation

* Aligned code with cleanup

* Adding reverse classes for manga reading

* Disable options for layout modes that doesn't make sense.

* Cleaned up manga reader menu items to link to preferences options directly

* Work in progress, but rendering the correct page numbers for double. Need to rework caching logic so we can use existing image objects

* Pagination logic is now properly increasing page number an extra when double layout mode

* I can't figure out cachedImages to work properly with double pages, but doing it in a way where it handles downloading the image (and etag cache) + rendering the url, seems to work really well

* Double original fix, also flex squish fix

* Implemented last page on double which will load next chapter.

Fixed a bug where if GetImage from ReaderController threw an error, the chapter directory would be emptied, but the folder itself wasn't deleted.

* Fixed a bad if for double manga

* double class fix

* Cleanup up some console.logs

* Adjusted the caching for images in a reading session so they cache for 2 mins

* fixing webtoon image issue

* Tweaked the caching of images to 10 mins for reading. Fixed a bug where after webtoon, single image layout would be selected. Tweaked logic for handling prev/next pages on chapter boundaries.

* Fixed an issue where 2nd page would be skipped

* Fixed an issue where 2nd page would be skipped

* Fixed a skip page issue

* Misc css fixes

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Misc Bugfixes and Cleanup (#1144)

* Moved libraryType into chapter info

* Fixed a bug where you could not reset cover on a series

* Patched in relevant changes from another polish branch

* Refactored invite user setup to shift the checking for accessibility to the backend and always show the link. This will help with users who have some unique setups in docker.

* Refactored invite user to always print the url to setup a new account.

* Single page renderer uses canvasImage rather than re-requesting and relying on cache

* Fixed a rendering issue where fit to split on single on a cover wouldn't force width scaling just for that image

* Fixed a rendering bug with split image functionality

* Added title to copy button

* Fixed a bug in GetContinuePoint when a chapter is added to an already read volume and a new chapter is added loose leaf. The loose leaf would be prioritized over the volume chapter.

Refactored 2 methods from controller into service and unit tested.

* Fixed a bug on opening a volume in series detail that had a chapter added to it after the volume (0 chapter) was read would cause a loose leaf chapter to be opened.

* Added mark as read/actionables on Files in volume detail modal. Fixed a bug where we were showing the wrong page count in a volume detail modal.

* Removed OnDeck page and replaced it with a pre-filtered All-Series. Hooked up the ability to pass read state to the filter via query params. Fixed some spacing on filter post bootstrap update.

* Fixed up some poor documentation on FilterDto.

* Bump versions by dotnet-bump-version.

* Bugfixes and Cover Chooser Upgrades (#1146)

* Fixed a bug where GetNextChapter would return a loose leaf chapter from a special when it should return nothing.

* Fixed a bug in events widget when an update comes in after a user refreshes, the active event counter could get out of sync, thus showing "Nothing going on here"

Refactored the events widget to be named appropriately.

* Refactored code to have errors during threaded tasks propagate to the UI via events widget (css still needed).

Removed ScanLibraryError in favor of generic Error event.

* Fixed up some code and added ability to remove the event from events widget

* Fixed a bug where modifiying certain fields, like summary, wouldn't lock the field

* Fixed a few bugs where lock state was not being set in the DB correctly nor were certain combinations of locking fields and editing fields.

* Removed debug code

* Updated the discord alert to tag new group

* Refactored cover upload to actually handle uploading a temp file via url on the backend so that users can user change cover by url. Fixed up some bugs that occured when chaning the image container in a previous PR.

* Code cleanup

* Cleaned up the css on the error items

* Code cleanup

* Bump versions by dotnet-bump-version.

* Side nav (#1155)

* adding back side-nav

* Event Widget Update (#1098)

* Took care of some notes in the code

* Fixed an issue where Extra might get flagged as special too early, if in a word like Extraordinary

* Moved Tag cleanup code into Scanner service. Added a SplitQuery to another heavy API. Refactored Scan loop to remove parallelism and use async instead.

* Lots of rework on the codebase to support detailed messages and easier management of message sending. Need to take a break on this work.

* Progress is being made, but slowly. Code is broken in this commit.

* Progress is being made, but slowly. Code is broken in this commit.

* Fixed merge issue

* Fixed unit tests

* CoverUpdate is now hooked into new ProgressEvent structure

* Refactored code to remove custom observables and have everything use standard messages$

* Refactored a ton of instances to NotificationProgressEvent style and tons of the UI to respect that too. UI is still a bit buggy, but wholistically the work is done.

* Working much better. Sometimes events come in too fast. Currently cover update progress doesn't display on UI

* Fixed unit tests

* Removed SignalREvent to minimize internal event types. Updated the UI to use progress bars. Finished SiteThemeService.

* Merged metadata refresh progress events and changed library scan events to merge cleaner in the UI

* Changed RefreshMetadataProgress to CoverUpdateProgress to reflect the event better.

* Theme Cleanup (#1089)

* Fixed e-ink theme not properly applying correctly

* Fixed some seed changes. Changed card checkboxes to use our themed ones

* Fixed recently added carousel not going to recently-added page

* Fixed an issue where no results found would show when searching for a library name

* Cleaned up list a bit, typeahead dropdown still needs work

* Added a TODO to streamline series-card component

* Removed ng-lazyload-image module since we don't use it. We use lazysizes

* Darken card on hover

* Fixing accordion focus style

* ux pass updates

- Fixed typeahead width
- Fixed changelog download buttons
- Fixed a select
- Fixed various input box-shadows
- Fixed all anchors to only have underline on hover
- Added navtab hover and active effects

* more ux pass

- Fixed spacing on theme cards
- Fixed some light theme issues
- Exposed text-muted-color for theme card subtitle color

* UX pass fixes

- Changed back to bright green for primary on dark theme
- Changed fa icon to black on e-ink

* Merged changelog component

* Fixed anchor buttons text decoration

* Changed nav tabs to have a background color instead of open active state

* When user is not authenticated, make sure we set default theme (dark)

* Cleanup on carousel

* Updated Users tab to use small buttons with icons to align with Library tab

* Cleaned up brand to not underline, removed default link underline on hover in dropdown and pill tabs

* Fixed collection detail posters not rendering

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Tweaked some of the emitting code

* Some css, but pretty bad. Robbie please save me

* Removed a todo

* styling update

* Only send filename on FileScanProgress

* Some console.log spam cleanup

* Various updates

* Show events widget activity based on activeEvents

* progress bar color updates

* Code cleanup

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Scanner event hub fix (#1099)

* Scanner event hub fix

- Fixed an issue where the scanner would error when adding a new series because the series didn't have a library name yet. (develop)

* Removing library.type

* Bump versions by dotnet-bump-version.

* Workflow update to add nightly versions (#1100)

# Changed
- Changed: Changed automated workflow to release individual nightly versions on dockerhub

* Bump versions by dotnet-bump-version.

* Updating GA to parse version (#1101)

* Bump versions by dotnet-bump-version.

* GA Fixes (#1103)

**Strictly Repo Changes**
# Fixed
- Fixed: Fixed an issue where patch version was not being added to docker tag.

* Bump versions by dotnet-bump-version.

* Fixed specials being misaligned (#1106)

# Fixed
- Fixed: Fixed issue with specials not being properly aligned (develop)

* Bump versions by dotnet-bump-version.

* Bugfix/ux pass 2 (#1107)

* Adding margin bottom to series detail tabs

* Styling tag badges with green on dark

- Added 3 new css vars

* Removing underline from readmore

* Fixing see more to be on one line

* adding gutter to see more

* Changing queue toasts to info

* adding api key tooltip

* Updating active accordion on user preference.

* Fixing search bar and close btn position

* Fixed a bug where entering book reader in dark mode then closing out, would leave you in a broken white state.

* Fixed broken wiki links

Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>

* Bump versions by dotnet-bump-version.

* Series Detail Refactor (#1118)

* Fixed a bug where reading list and collection's summary wouldn't render newlines

* Moved all the logic in the UI for Series Detail into the backend (messy code). We are averaging 400ms max with much optimizations available. Next step is to refactor out of controller and provide unit tests.

* Unit tests for CleanSpecialTitle

* Laid out foundation for testing major code in SeriesController.

* Refactored code so that read doesn't need to be disabled on page load. SeriesId doesn't need the series to actually load.

* Removed old property from Volume

* Changed tagbadge font size to rem.

* Refactored some methods from SeriesController.cs into SeriesService.cs

* UpdateRating unit tested

* Wrote unit tests for SeriesDetail

* Worked up some code where books are rendered only as volumes. However, looks like I will need to use Chapters to better support series_index as floats.

* Refactored Series Detail to change Volume Name on Book libraries to have book name and series_index.

* Some cleanup on the code

* DeleteMultipleSeries test is hard. Going to skip.

* Removed some debug code and make all tabs Books for Book library Type

* Bump versions by dotnet-bump-version.

* Tachiyomi Bugfix (#1119)

* Updated the dependencies for .NET 6.0.2

* Fixed a bad prev chapter logic where we would bleed into chapters from last volume instead of specials.

* Fixed the get prev chapter code to properly walk the order according to documentation and updated some bad test cases

* Updated side nav to float a bit and added user settings to it.

* Refactored the code to hide/show sidenav to be more angular and decoupled

* Moved Changelog out of admin dashboard and into a dedicated page in user menu. Added a wiki link from user menu

* Introduced a side nav item for rendering each item and refactored code to use it.

* Added a filter of side nav when there are more than 10 libraries. Added some themeing overrides for side nav.

* Cleaned up the template code for side nav item so if there is no link, we don't generate that html directive

* Refactored side nav into a module and migrated a few pipes into a pipe module for easy re-use

* Added companion bar on reading list and collection. Updated modules to load pages and make side nav items clickable as anchors, so new tab works.

* Moved metadata filter into separate component/module and the button in the companion bar. Needs cleanup.

* Finished cleanup and refactoring of metadata filter into separate component.

Removed filtering from Collections as it doesn't work and wasn't hooked up.

* Tweaked the css on carousel component

* Added to library detail and series-detail

* Fixes and css vars

* Stop destroying sidenav, animaton timing

* Integrated side nav on the rest of the pages

* Navbar now collapses to icons

* mobile sidenav start

* more mobile fixes

* mobile tweaks

* light and e-ink theme updates

* white and eink dropdown color fixes

* plex inspired side-nav

* theme fixes

* Making spacing more uniform across app

* More fixes

* fixing spacing on cards

* actionable fix for sidenav

* no scroll on mobile when sidenav is open

* hide sidenav on pages

* Adding card spacing

* Adding ability to remove sidenav when in a reader

* tidying up sidenav toggles

* side-nav mobile updates

* fixing up other themes

* overlay fixes

* Cleaned up the code to make the observables have better names.

Removed a bunch of pointless subscriptions. Cleaned up methods that werent needed.

Added jsdocs to help ensure the understandability of the 2 states for the side nav.

* Integrated a highlight effect on side nav. Fixed a ton of places where the nav was being hidden when it shouldn't.

* Fixed where active state wasn't working on all urls

* misc fixes

- smaller hamburger
- z-index fixes
- active fixes

* Revert "Merge branch 'develop' into feature/side-nav-upgrade"

This reverts commit 76b0d15a984692874e0cb57e821686ea703144cf, reversing
changes made to b3ed55395473aa35577500596a211ad22a42631b.

* Fixing edit-series modal spacing

* Give the ability to jump to a library from admin manage libraries page

* Fixed a bug with highlighting active item on side nav

* Moved localized series title to companion bar via subtitle

* Removed old title

* Fixed a bug where clicking a link would reload the whole app, styling fixes on filter, fixed issue with initial load not setting active state, adjusted styles on active style.

* code cleanup

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Fixed a bug where companion bar would be pushing content to the right even when not visible. Updated nav service localstorage key. (#1159)

* Bump versions by dotnet-bump-version.

* Side Nav Fixes (#1161)

* Fixed an issue where there was extra padding on top/bottom of readers when side nav was hidden.

* Fixed a bug where fit to screen wasn't forcing width scaling

* Added back total pages to many pages

* Fixed the padding on series detail cards

* Tweaked carousels to match series detail padding

* Fixed an issue where large amount of libraries could have 2 highlighted at once due to how highlight logic works on routes.

* Cleaned up some extra space in card detail layout due to moving title into compainion bar

* Moved some gloabls to global and moved color-scheme to body tag

* Moved scrollbar onto the body itself which helps with page jank on loading and fixes scrollbar not working with theme

* Bump versions by dotnet-bump-version.

* Fixed loose chapters marked as read for Tachiyomi (#1158)

* Tachiyomi-related fixes

* Created unit test for MarkAsReadAnythingUntil

* Applied the requested changes.

* More Bugfixes from Side Nav (#1162)

* Fixed a bug where the bottom of the page could be cut off

* Adjusted all the headings to h2, which looks better

* Refactored GetSeriesDetail to actually map the names inside the code so the UI just displays.

* Put in some basic improvements to OPDS by using Series Detail type layout, but this only reduces one click.

* Fixed a bug where offset from scrollbar fix causes readers to be cutoff.

* Bump versions by dotnet-bump-version.

* Bump versions by dotnet-bump-version.

* OPDS Rework (#1164)

* Fixed a bug where the bottom of the page could be cut off

* Adjusted all the headings to h2, which looks better

* Refactored GetSeriesDetail to actually map the names inside the code so the UI just displays.

* Put in some basic improvements to OPDS by using Series Detail type layout, but this only reduces one click.

* Fixed a bug where offset from scrollbar fix causes readers to be cutoff.

* Ensure the hamburger menu icon is aligned with side nav

* Disable the image splitting dropdown in webtoon mode

* Fixed broken progress/scroll code as we scroll on the body instead of window now

* Fixed phone-hidden class not working due to a bad media query

* Lots of changes to OPDS to provide a richer text experience. Uses Issues or Books based on library type. Cleans up the experience by providing Storyline from the get-go.

* Updated OPDS-SE search description to include collections and reading lists.

* Fixed up some title stuff

* If a volume only has one file underneath it, flatten it and send a chapter as if it were the volume.

* Code cleanup

* Bump versions by dotnet-bump-version.

* Feature/enhancements and more (#1166)

* Moved libraryType into chapter info

* Fixed a bug where you could not reset cover on a series

* Patched in relevant changes from another polish branch

* Refactored invite user setup to shift the checking for accessibility to the backend and always show the link. This will help with users who have some unique setups in docker.

* Refactored invite user to always print the url to setup a new account.

* Single page renderer uses canvasImage rather than re-requesting and relying on cache

* Fixed a rendering issue where fit to split on single on a cover wouldn't force width scaling just for that image

* Fixed a rendering bug with split image functionality

* Added title to copy button

* Fixed a bug in GetContinuePoint when a chapter is added to an already read volume and a new chapter is added loose leaf. The loose leaf would be prioritized over the volume chapter.

Refactored 2 methods from controller into service and unit tested.

* Fixed a bug on opening a volume in series detail that had a chapter added to it after the volume (0 chapter) was read would cause a loose leaf chapter to be opened.

* Added mark as read/actionables on Files in volume detail modal. Fixed a bug where we were showing the wrong page count in a volume detail modal.

* Removed OnDeck page and replaced it with a pre-filtered All-Series. Hooked up the ability to pass read state to the filter via query params. Fixed some spacing on filter post bootstrap update.

* Fixed up some poor documentation on FilterDto.

* Some string equals enhancements to reduce extra allocations

* Fixed an issue when trying to download via a url, to remove query parameters to get the format

* Made an optimization to Normalize method to reduce memory pressure by 100MB over the course of a scan (16k files)

* Adjusted the styles on dashboard for first time setup and used a routerlink rather than href to avoid a fresh load.

* Use framgment on router link

* Hooked in the ability to search by release year (along with series optionally) and series will be returned back.

* Fixed a bug in the filter format code where it was sending the wrong type

* Only show clear all on typeahead when there are at least one selected item

* Cleaned up the styles of the styles of the typeahead

* Removed some dead code

* Implemented the ability to filter against a series name.

* Fixed filter top offset

* Ensure that when we add or remove libraries, the side nav of users gets updated.

* Tweaked the width on the mobile side nav

* Close side nav on clicking overlay on mobile viewport

* Don't show a pointer if the carousel section title is not actually selectable

* Removed the User profile on the side nav so home is always first. Tweaked styles to match

* Fixed up some poor documentation on FilterDto.

* Fixed a bug where Latest read date wasn't being set due to an early short circuit.

* When sending the chapter file, format the title of the FeedEntry more like Series Detail.

* Removed dead code

* Bump versions by dotnet-bump-version.

* Bugfixes  (#1177)

* Fixed an underline on hover of pagination link

* Ensure title of companion bar eats full width if there is no filter

* If a user doesn't have the Download role, they will not be able to download over OPDS.

* Fixed a bug where after going into webtoon reader mode then leaving, the bookmark effect would continue using the webtoon mode styling

* Fixed a bug where continuous reader wasn't being triggered due to moving scrollbar to body and a floating point percision error on scroll top

* Fixed how continuous trigger is shown so that we properly adjust scroll on the top (for prev chapter)

* Fixed a bad merge that broke saving any edits to series metadata

* When a epub key is not correct, even after we correct it, ignore the inlining of the style so the book is at least still readable.

* Disabled double rendering (this feature is being postponed to a later release)

* Disabled user setting and forced it to Single on any save

* Removed cache directory from UpdateSettings validation as we don't allow changing it.

* Fix security issue with url parse

* After all migrations run, update the installed version in the Database. Send that installed version on the stat service.

* Dependency bot to update some security stuff

* Some misc code cleanup and fixes on the typeahead (still broken)

* Bump versions by dotnet-bump-version.

* New Feature Stats (#1179)

* When searching, search against normalized names.

* Added new stat fields

* Bump versions by dotnet-bump-version.

* Getting Ready for Release (#1180)

* One more unit test for Tachiyomi

* Removed some debug code in the manga reader menu

* Fixed a typeahead bug where using Enter on add new item or selected options could cause items to disappear from selected state or other visual glitches

* Actually fix the selection issue. We needed to filter out selected before we access element

* Cleaned up collection detail page to align to new side nav design

* Cleaned up some styling on the reading list page

* Fixed a bug where side nav would not be visible on the main app due to some weird redirect logic

* Fixed a bug where when paging to the last page, a page will be skipped and user will have to refresh manually to view

* Fixed some styling bugs on drawer for light themes. Added missing pagination colors on light themes

* On mobile screens, add some padding on series-detail page

* Fixed a bad test case helper

* Bump versions by dotnet-bump-version.

* Release Shakeout Part 1 (#1184)

* Have actionables on series detail action bar and in title to make it easier to use.

* Fixed a bug where super long titles could render over the book content

* Fixed a bug in get continue point where it wasn't working in an edge case

* Bump versions by dotnet-bump-version.

* Release Shakeout (#1186)

* Cleaned up some styles on the progress bar in book reader

* Fixed up some phone-hidden classes and added titles around the codebase. Stat reporting on first run now takes into account that admin user wont exist.

* Fixed manage library page not updating last scan time when a notification event comes in.

* Integrated SeriesSort ComicInfo tag (somehow it got missed)

* Some minor style changes and no results found for bookmarks on chapter detail modal

* Fixed the labels in action bar on book reader so Prev/Next are in same place

* Cleaned up some responsive styles around images and reduced custom classes in light of new display classes on collection detail and series detail pages

* Fixed an issue with webkit browsers and book reader where the scroll to would fail as the document wasn't fully rendered. A 10ms delay seems to fix the issue.

* Cleaned up some code and filtering for collections. Collection detail is missing filtering functionality somehow, disabled the button and will add in future release

* Correctly validate and show a message when a user is not an admin or has change password role when going through forget password flow.

* Fixed a bug on manage libraries where library last scan didn't work on first scan of a library, due to there being no updated series.

* Fixed a rendering issue with text being focused on confirm email page textboxes. Fixed a bug where when deleting a theme that was default, Kavita didn't reset Dark as the default theme.

* Cleaned up the naming and styles for side nav active item hover

* Fixed event widget to have correct styling on eink and light

* Tried to fix a rendering issue on side nav for light themes, but can't figure it out

* On light more, ensure switches are green

* Fixed a bug where opening a page with a preselected filter, the filter toggle button would require 2 clicks to collapse

* Reverted the revert of On Deck.

* Improved the upload by url experience by sending a custom fail error to UI when a url returns 401.

* When deleting a library, emit a series removed event for each series removed so user's dashboards/screens update.

* Fixed an api throwing an error due to text being sent back instead of json.

* Fixed a refresh bug with refreshing pending invites after deleting an invite. Ensure we always refresh pending invites even if user cancel's from invite, as they might invite, then hit cancel, where invite is still active.

* Fixed a bug where invited users with + in the email would fail due to validation, but UI wouldn't properly inform user.

* Bump versions by dotnet-bump-version.

* Version bump for release (#1187)

* Bump versions by dotnet-bump-version.

* Tech Debt + Series Sort bugfix (#1192)

* Code cleanup.

When copying files, if the target file already exists, append (1), (2), etc onto the file (this is enhancing existing implementation to allow multiple numbers)

* Added a ton of null checks to UpdateSeriesMetadata and made the code work on the rare case (not really possible) that SeriesMetadata doesn't exist.

* Updated Genre code to use strings to ensure a better, more fault tolerant update experience.

* More cleanup on the codebase

* Fixed a bug where Series SortName was getting emptied on file scan

* Fixed a bad copy

* Fixed unit tests

* Bump versions by dotnet-bump-version.

* Post Release Shakeout (Hotfix Testing) (#1200)

* Fixed an issue where when falling back to folder parsing, sometimes the folder name wouldn't parse well, like "Foo 50" which parses as "Foo". Now the fallback will check if we have a solid series parsed from filename before we attempt to parse a folder.

* Ensure SortName is set during a scan loop even if locked and it's empty string.

* Added some null checks for metadata update

* Fixed a bug where Updating a series name with a name of an existing series wouldn't properly check for existing series.

* Tweaked the logic of OnDeck to consider LastChapterCreated from all chapters in a series, not just those with progress.

* Fixed a bug where the hamburger menu was still visible on login/registration page despite not functioning

* Tweaked the logic of OnDeck to consider LastChapterCreated from all chapters in a series, not just those with progress.

* Removed 2 unused packages from ui

* Fixed some bugs around determining what the current installed version is in Announcements

* Use AnyAsync for a query to improve performance

* Fixed up some fallback code

* Tests are finally fixed

* Bump versions by dotnet-bump-version.

* PDF Rendering on Pi (64bit) & Backup Fix (#1204)

* Updated dependencies. SharpCompress has been updated to v2.1.0 which should fix pdf rendering on pi/arm64 devices.

* Removed some dependencies not needed and updated the Backup code to account for themes and ensure everything gets copied every time.

* Bump versions by dotnet-bump-version.

* Hotfix Prep (#1211)

* Patched cover image change that somehow got missed

* Fixed a bug where clicking bottom action bar buttons on book reader wouldn't work correctly (would close drawer when trying to open)

* Bump versions by dotnet-bump-version.

* Fixed some missing merge stuff

* On Deck + Misc Fixes and Changes (#1215)

* Added playwright and started writing e2e tests.

* To make things easy, disabled other browsers while I get confortable. Added a login flow (assumes my dev env)

* More tests on login page

* Lots more testing code, trying to figure out auth code.

* Ensure we don't track DBs inside config

* Added a new date property for when chapters are added to a series which helps with OnDeck calculations. Changed a lot of heavy api calls to use IEnumerable to stream repsonse to UI.

* Fixed OnDeck with a new field for when last chapter was added on Series. This is a streamlined way to query.

Updated Reading List with NormalizedTitle, CoverImage, CoverImageLocked.

* Implemented the ability to read a random item in the reading list and for the reading list to be intact for order.

* Tweaked the style for webtoon to not span the whole width, but use max width

* When we update a cover image just send an event so we don't need to have logic for when updates occur

* Fixed a bad name for entity type on cover updates

* Aligned the edit collection tag modal to align with new tab design

* Rewrote code for picking the first file for metadata to ensure it always picks the correct file, esp if the first chapter of a series starts with a float (1.1)

* Refactored setting LastChapterAdded to ensure we do it on the Series.

* Updated Chapter updating in scan loop to avoid nested for loop and an additional loop.

* Fixed a bug where locked person fields wouldn't persist between scans.

* Updated Contributing to reflect how to view the swagger api

* Bump versions by dotnet-bump-version.

* Fixes, Tweaks, and Series Filtering (#1217)

* From previous fix, added the other locking conditions on the update series metadata.

* Fixed a bug where custom series, collection tag, and reading list covers weren't being removed on cleanup.

* Ensure reading list detail has a margin to align to the standard

* Refactored some event stuff to use dedicated consts. Introduced a new event when users read something, which can update progress bars on cards.

* Added recomended and library tags to the library detail page. This will eventually offer more custom analytics

* Cleanup some code onc arousel

* Adjusted scale to height/width css to better fit

* Small css tweaks to better center images in the manga reader in both axis. This takes care of double page rendering as well.

* When a special has a Title set in the metadata, on series detail page, show that on the card rather than filename.

* Fixed a bug where when paging in manga reader, the scroll to top wasn't working due to changing where scrolling is done

* More css goodness for rendering images in manga reader

* Fixed a bug where clearing a typeahead externally wouldn't clear the x button

* Fixed a bug where filering then using keyboard would select wrong option

* Added a new sorting field for Last Chapter Added (new field) to get a similar on deck feel.

* Tweaked recently updated to hit the NFR of 500ms (300ms fresh start) and still give a much better experience.

* Refactored On deck to now go to all series and also sort by last updated. Recently Added Series now loads all series with sort by created.

* Some tweaks on css for cover image chooser

* Fixed a bug in pagination control where multiple pagination events could trigger on load and thus multiple requests for data on parent controller.

* Updated edit series modal to show when the last chapter was added and when user last read it.

* Implemented a highlight on the fitler button when a filter is active.

* Refactored metadata filter screens to perserve the filters in the url and thus when navigating back and forth, it will retain. users should click side nav to reset the state.

* Hide middle section on companion bar on phones

* Cleaned up some prefilters and console.logs

* Don't open drawer by default when a filter is active

* Bump versions by dotnet-bump-version.

* Filtering Bugfixes (#1220)

* Cleaned up random strings and unified them in one place.

* Implemented the ability to disable typeaheads

* Refactored disable state to disable controls on filter

* Fixed an overflow regression on title

* Updated ComicInfo DTO which had some bad properties on it

* Cleaned up some code around disabled typeaheads/filters

* Fixed typeaheads causing resets to state and mucking up filter presets

* Fixed state not refreshing between page loads

* Fixed a bad parsing for My Charms Are Wasted on Kuroiwa Medaka - Ch. 37.5 - Volume Extras

* Cleanup within the metadata filter to reuse logic and minimize extra loops.

* Fixed a timing issue with typeahead and first load for people

* Fixed a bug in Publication Status for a given library, which would fail due to not performing some of the query in memory. Removed a custom index on Series table that wasn't used and potentially caused constraint issues.

* Added a wiki link for stats collections

* Security bump

* Fixed the regex

* Bump versions by dotnet-bump-version.

* Fixing duplicate chapter issue and adding unit test (#1221)

* Fixing duplicate chapter issue and adding unit test

* Update test name

* Bump versions by dotnet-bump-version.

* Fixes #1222 (#1223)

Co-authored-by: mihaibargau <mihai.bargau@gmail.com>

* Bump versions by dotnet-bump-version.

* Bump versions by dotnet-bump-version.

* Adding gif support (#1225)

* Adding gif to accepted image extension and unit test

* Revert "Adding gif to accepted image extension and unit test"

This reverts commit d0df8239068ddc12f44aed752804b5db60243e44.

* Adding gif support and unit test

* unit test and event widget

- updating unit test archives to temive unneeded gifs, causing failures
- adding overflow to event widget

* Bump versions by dotnet-bump-version.

* Readable Bookmarks (#1228)

* Moved bookmarks to it's own page on side nav and integrated actions.

* Implemented the ability to read bookmarks in the manga reader.

* Removed old bookmark components that aren't needed any longer.

* Removed recently added component as we use all-series instead now

* Removed bookmark tab from card detail

* Fixed scroll to top not working and being missing

* When opening the side nav on mobile with metadata filter already open, collapse the filter.

* When on mobile viewports, when clicking an item from side nav, collapse it afterwards

* Converted most of series detail to use the card detail layout, except storyline which has custom logic

* Fixed unit test

* Bump versions by dotnet-bump-version.

* Fixed a bad index causing card details modal to fail to render (#1229)

* Bump versions by dotnet-bump-version.

* Linked Series (#1230)

* Implemented the ability to link different series together through Edit Series. CSS pending.

* Fixed up the css for related cards to show the relation

* Working on making all tabs in edit seris modal save in one go. Taking a break.

* Some fixes for Robbie to help with styling on

* Linked series pill, center library

* Centering library detail and related pill spacing

- Library detail cards are now centered if total number of items is > 6 or if mobile.
- Added ability to determine if mobile (viewport width <= 480px
- Fixed related card spacing
- Fixed related card pill spacing

* Updating relation form spacing

* Fixed a bug in card detail layout when there is no pagination, we create one in a way that all items render at once.

* Only auto-close side nav on phones, not tablets

* Fixed a bug where we had flipped state on sideNavCollapsed$

* Cleaned up some misleading comments

* Implemented RBS back in and now  if you have a relationship besides prequel/sequel, the target series will show a link back to it's parent.

* Added Parentto pipe

* Missed a relationship type

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Publication Status Enhancements (#1231)

* Trim when reading some fields from ComicInfo. Adjusted css on the site to reduce nbsp

* Added Cancelled as a publication status

* Ensure we track volume number from ComicInfo for the count to determine publication status

* Publication Status will now check against volume number or chapter number (parsed or comicinfo). The UI will now display the progress, ie) 10/15 and will show the series as completed with a green tag badge if the progress is 100%.

* Tweaked the ordering of the tabs to make it more streamlined in the reading ordering of Kavita

* Tweaked the logic for filling in tag badge

* Added a new publication status of Ended for series that have finished releasing, but not all items are in Kavita

* Added some fields to edit series modal

* Bump versions by dotnet-bump-version.

* Feature/misc (#1234)

* Fixed a bug where publication status could show as filled in when total number is 0 but there is a max count.

Add ComicInfo support for LocalizedSeries which will populate a Series LocalizedName.

Fixed an issue in tag constraint issues.

* Hooked in LocalizedSeries tag into merge step in scanner.

* Hooked in LocalizedSeries from ComicInfo into Kavita and also use it to help during merge phase to avoid 2 different series, if one file is using the name of the localized series.

* Reduced some extra string creation and updated epub library to ignore bad ToCs.

* Bumped dependencies to latest. When an epub doesn't have a dc:date with publication event type, default back to just a normal dc:date tag.

* Fixed a bug where webtoon reader would error out on first load due to how we passed the function to the reader

* Reverted the centering code

* Bump versions by dotnet-bump-version.

* Library Recomendations (#1236)

* Updated cover regex for finding cover images in archives to ignore back_cover or back-cover

* Fixed an issue where Tags wouldn't save due to not pulling them from the DB.

* Refactored All series to it's own lazy loaded module

* Modularized Dashboard and library detail. Had to change main dashboard page to be libraries. Subject to change.

* Refactored login component into registration module

* Series Detail module created

* Refactored nav stuff into it's own module, not lazy loaded, but self contained.

* Refactored theme component into a dev only module so we don't incur load for temp testing modules

* Finished off modularization code. Only missing thing is to re-introduce some dashboard functionality for library view.

* Implemented a basic recommendation page for library detail

* Bump versions by dotnet-bump-version.

* Major Search Enhancements (#1238)

* Pull progress information for some of the recommended stuff.

* Fixed some redirection code from last PR

* Implemented the ability to search for files in the search and open the series directly.

* Fixed nav search bar expanding too much

* Fixed a bug in nav module not having router so some links broke

* Fixed an issue where with new localized series tag, merging could fail if the user had 2 series with the series and localized series.

Added extra error handling for tracking series parsed from disk.

* Fixed the slowness when typing in a typeahead by using auditTime vs debounceTime

* Removed some cleaning of Edition tags from the Parser. Only Omnibus and Uncensored will be ignored when cleaning titles, Full Color, Full Contact, etc will now stay in the title for Series name.

* Implemented ability to search against chapter's title (from epub or title in comicinfo). This should help users search for books in a series a lot easier.

* Restrict each search type to 15 records only to keep query performant and UI useful.

* Wrote some extra messaging on invite user flow around email.

* Messaging update

* Bump versions by dotnet-bump-version.

* Misc Cleanup (#1242)

* Updated the wording for Read in incognito, as 'in' was redundant

* Added icons to the middle tabs for a mobile compaitible view

* Fixed up the code for side nav to make the display much cleaner

* Added icons to tabs

* Styling polishing

- Making pagination spacing uniform
- Fixing onresize event
- Making cards center justification on mobile only
- fixing vertical alignment for companion bar icons
- Fixing Issue where drawer buttons would sometimes not be visible.
- Fixed vertical alignment issue with filter button

* Fixing orientation change event

* added fixed position to drawer

- fixes styling issues

* added total pages to series modal

* Downgraded ExCSS package to a version that doesn't die on @page query selectors.

* Cleaned up some code and wrote some bug markers in typeahead

* Removed some padding top on companion bar

* Aligned the top margin for card detail layout and series detail

* Use a temp close button on book reader until new code is ready.

Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>

* Bump versions by dotnet-bump-version.

* Bugfix polishing  (#1245)

* Fixed a bug where volumes that are a range fail to generate series detail

* Moved tags closer to genre instead of between different people

* Optimized the query for On Deck

* Adjusted mime types to map to cbX types instead of their generic compression methods.

* Added wiki documentation into invite user flow and register admin user to help users understand email isn't required and they can host their own service.

* Refactored the document height to be set and removed on nav service, so the book reader and manga reader aren't broken.

* Refactored On Deck to first be completely streamed to UI, without having to do any processing in memory. Rewrote the query so that we sort by progress then chapter added. Progress is 30 days inclusive, chapter added is 7 days.

* Fixed an issue where epub date parsing would sometimes fail when it's only a year or not a year at all

* Fixed a bug where incognito mode would report progress

* Fixed a bug where bulk selection in storyline tab wouldn't properly run the action on the correct chapters (if selecting from volume -> chapter).

* Removed a - 1 from total page from card progress bar as the original bug was fixed some time ago

* Fixed a bug where the logic for filtering out a progress event for current logged in user didn't check properly…
  • Loading branch information
10 people committed Jun 30, 2022
1 parent f9b3f1a commit 6d0b18c
Show file tree
Hide file tree
Showing 298 changed files with 17,452 additions and 3,086 deletions.
15 changes: 15 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:5000",
"webRoot": "${workspaceFolder}"
}
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Expand Up @@ -46,5 +46,6 @@
"bold": false,
"italic": false
}
]
],
"diffEditor.wordWrap": "off"
}
68 changes: 68 additions & 0 deletions API.Benchmark/EpubBenchmark.cs
@@ -0,0 +1,68 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using API.Services;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Order;
using HtmlAgilityPack;
using VersOne.Epub;

namespace API.Benchmark;

[MemoryDiagnoser]
[Orderer(SummaryOrderPolicy.FastestToSlowest)]
[RankColumn]
[SimpleJob(launchCount: 1, warmupCount: 3, targetCount: 5, invocationCount: 100, id: "Epub"), ShortRunJob]
public class EpubBenchmark
{
[Benchmark]
public static async Task GetWordCount_PassByString()
{
using var book = await EpubReader.OpenBookAsync("Data/book-test.epub", BookService.BookReaderOptions);
foreach (var bookFile in book.Content.Html.Values)
{
Console.WriteLine(GetBookWordCount_PassByString(await bookFile.ReadContentAsTextAsync()));
;
}
}

[Benchmark]
public static async Task GetWordCount_PassByRef()
{
using var book = await EpubReader.OpenBookAsync("Data/book-test.epub", BookService.BookReaderOptions);
foreach (var bookFile in book.Content.Html.Values)
{
Console.WriteLine(await GetBookWordCount_PassByRef(bookFile));
}
}

private static int GetBookWordCount_PassByString(string fileContents)
{
var doc = new HtmlDocument();
doc.LoadHtml(fileContents);
var delimiter = new char[] {' '};

return doc.DocumentNode.SelectNodes("//body//text()[not(parent::script)]")
.Select(node => node.InnerText)
.Select(text => text.Split(delimiter, StringSplitOptions.RemoveEmptyEntries)
.Where(s => char.IsLetter(s[0])))
.Select(words => words.Count())
.Where(wordCount => wordCount > 0)
.Sum();
}

private static async Task<int> GetBookWordCount_PassByRef(EpubContentFileRef bookFile)
{
var doc = new HtmlDocument();
doc.LoadHtml(await bookFile.ReadContentAsTextAsync());
var delimiter = new char[] {' '};

return doc.DocumentNode.SelectNodes("//body//text()[not(parent::script)]")
.Select(node => node.InnerText)
.Select(text => text.Split(delimiter, StringSplitOptions.RemoveEmptyEntries)
.Where(s => char.IsLetter(s[0])))
.Select(words => words.Count())
.Where(wordCount => wordCount > 0)
.Sum();
}
}
3 changes: 2 additions & 1 deletion API.Benchmark/Program.cs
Expand Up @@ -14,7 +14,8 @@ private static void Main(string[] args)
{
//BenchmarkRunner.Run<ParseScannedFilesBenchmarks>();
//BenchmarkRunner.Run<TestBenchmark>();
BenchmarkRunner.Run<ParserBenchmarks>();
//BenchmarkRunner.Run<ParserBenchmarks>();
BenchmarkRunner.Run<EpubBenchmark>();

}
}
Expand Down
8 changes: 4 additions & 4 deletions API.Tests/API.Tests.csproj
Expand Up @@ -7,12 +7,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="NSubstitute" Version="4.3.0" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="17.0.3" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="17.0.15" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
10 changes: 10 additions & 0 deletions API.Tests/Parser/MangaParserTests.cs
Expand Up @@ -66,6 +66,13 @@ public MangaParserTests(ITestOutputHelper testOutputHelper)
[InlineData("Hentai Ouji to Warawanai Neko. - Vol. 06 Ch. 034.5", "6")]
[InlineData("The 100 Girlfriends Who Really, Really, Really, Really, Really Love You - Vol. 03 Ch. 023.5 - Volume 3 Extras.cbz", "3")]
[InlineData("The 100 Girlfriends Who Really, Really, Really, Really, Really Love You - Vol. 03.5 Ch. 023.5 - Volume 3 Extras.cbz", "3.5")]
[InlineData("幽游白书完全版 第03卷 天下", "3")]
[InlineData("阿衰online 第1册", "1")]
[InlineData("【TFO汉化&Petit汉化】迷你偶像漫画卷2第25话", "2")]
[InlineData("63권#200", "63")]
[InlineData("시즌34삽화2", "34")]
[InlineData("スライム倒して300年、知らないうちにレベルMAXになってました 1巻", "1")]
[InlineData("スライム倒して300年、知らないうちにレベルMAXになってました 1-3巻", "1-3")]
public void ParseVolumeTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseVolume(filename));
Expand Down Expand Up @@ -246,6 +253,9 @@ public void ParseSeriesTest(string filename, string expected)
[InlineData("Harrison, Kim - The Good, The Bad, and the Undead - Hollows Vol 2.5.epub", "0")]
[InlineData("Kaiju No. 8 036 (2021) (Digital)", "36")]
[InlineData("Samurai Jack Vol. 01 - The threads of Time", "0")]
[InlineData("【TFO汉化&Petit汉化】迷你偶像漫画第25话", "25")]
[InlineData("이세계에서 고아원을 열었지만, 어째서인지 아무도 독립하려 하지 않는다 38-1화 ", "38")]
[InlineData("[ハレム]ナナとカオル ~高校生のSMごっこ~ 第10話", "10")]
public void ParseChaptersTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseChapter(filename));
Expand Down
19 changes: 13 additions & 6 deletions API.Tests/Services/BookmarkServiceTests.cs
Expand Up @@ -47,6 +47,12 @@ public BookmarkServiceTests()
_unitOfWork = new UnitOfWork(_context, Substitute.For<IMapper>(), null);
}

private BookmarkService Create(IDirectoryService ds)
{
return new BookmarkService(Substitute.For<ILogger<BookmarkService>>(), _unitOfWork, ds,
Substitute.For<IImageService>(), Substitute.For<IEventHub>());
}

#region Setup

private static DbConnection CreateInMemoryDatabase()
Expand Down Expand Up @@ -121,7 +127,8 @@ private static MockFileSystem CreateFileSystem()
public async Task BookmarkPage_ShouldCopyTheFileAndUpdateDB()
{
var filesystem = CreateFileSystem();
filesystem.AddFile($"{CacheDirectory}1/0001.jpg", new MockFileData("123"));
var file = $"{CacheDirectory}1/0001.jpg";
filesystem.AddFile(file, new MockFileData("123"));

// Delete all Series to reset state
await ResetDB();
Expand Down Expand Up @@ -157,7 +164,7 @@ public async Task BookmarkPage_ShouldCopyTheFileAndUpdateDB()


var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem);
var bookmarkService = new BookmarkService(Substitute.For<ILogger<BookmarkService>>(), _unitOfWork, ds);
var bookmarkService = Create(ds);
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(1, AppUserIncludes.Bookmarks);

var result = await bookmarkService.BookmarkPage(user, new BookmarkDto()
Expand All @@ -166,7 +173,7 @@ public async Task BookmarkPage_ShouldCopyTheFileAndUpdateDB()
Page = 1,
SeriesId = 1,
VolumeId = 1
}, $"{CacheDirectory}1/0001.jpg");
}, file);


Assert.True(result);
Expand Down Expand Up @@ -227,7 +234,7 @@ public async Task BookmarkPage_ShouldDeleteFileOnUnbookmark()


var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem);
var bookmarkService = new BookmarkService(Substitute.For<ILogger<BookmarkService>>(), _unitOfWork, ds);
var bookmarkService = Create(ds);
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(1, AppUserIncludes.Bookmarks);

var result = await bookmarkService.RemoveBookmarkPage(user, new BookmarkDto()
Expand Down Expand Up @@ -319,7 +326,7 @@ public async Task DeleteBookmarkFiles_ShouldDeleteOnlyPassedFiles()


var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem);
var bookmarkService = new BookmarkService(Substitute.For<ILogger<BookmarkService>>(), _unitOfWork, ds);
var bookmarkService = Create(ds);

await bookmarkService.DeleteBookmarkFiles(new [] {new AppUserBookmark()
{
Expand Down Expand Up @@ -378,7 +385,7 @@ public async Task GetBookmarkFilesById_ShouldMatchActualFiles()


var ds = new DirectoryService(Substitute.For<ILogger<DirectoryService>>(), filesystem);
var bookmarkService = new BookmarkService(Substitute.For<ILogger<BookmarkService>>(), _unitOfWork, ds);
var bookmarkService = Create(ds);
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(1, AppUserIncludes.Bookmarks);

await bookmarkService.BookmarkPage(user, new BookmarkDto()
Expand Down
4 changes: 2 additions & 2 deletions API.Tests/Services/CacheServiceTests.cs
Expand Up @@ -279,8 +279,8 @@ public void GetCachedEpubFile_ShouldReturnFirstEpub()
}
}
};
cs.GetCachedEpubFile(1, c);
Assert.Same($"{DataDirectory}1.epub", cs.GetCachedEpubFile(1, c));
cs.GetCachedFile(c);
Assert.Same($"{DataDirectory}1.epub", cs.GetCachedFile(c));
}

#endregion
Expand Down
8 changes: 7 additions & 1 deletion API.Tests/Services/CleanupServiceTests.cs
Expand Up @@ -6,8 +6,11 @@
using System.Linq;
using System.Threading.Tasks;
using API.Data;
using API.DTOs.Settings;
using API.Entities;
using API.Entities.Enums;
using API.Helpers;
using API.Helpers.Converters;
using API.Services;
using API.Services.Tasks;
using API.SignalR;
Expand Down Expand Up @@ -48,7 +51,10 @@ public CleanupServiceTests()
_context = new DataContext(contextOptions);
Task.Run(SeedDb).GetAwaiter().GetResult();

_unitOfWork = new UnitOfWork(_context, Substitute.For<IMapper>(), null);
var config = new MapperConfiguration(cfg => cfg.AddProfile<AutoMapperProfiles>());
var mapper = config.CreateMapper();

_unitOfWork = new UnitOfWork(_context, mapper, null);
}

#region Setup
Expand Down
49 changes: 48 additions & 1 deletion API.Tests/Services/SeriesServiceTests.cs
Expand Up @@ -8,6 +8,7 @@
using API.DTOs;
using API.DTOs.CollectionTags;
using API.DTOs.Metadata;
using API.DTOs.Reader;
using API.Entities;
using API.Entities.Enums;
using API.Extensions;
Expand All @@ -21,6 +22,8 @@
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.Extensions.Logging;
using NSubstitute;
using NSubstitute.Extensions;
using NSubstitute.ReceivedExtensions;
using Xunit;
using Xunit.Sdk;

Expand Down Expand Up @@ -253,6 +256,50 @@ public async Task SeriesDetail_ShouldReturnVolumesAndChapters_ButRemove0Chapter(
Assert.Equal(2, detail.Volumes.Count());
}

[Fact]
public async Task SeriesDetail_ShouldReturnCorrectNaming_VolumeTitle()
{
await ResetDb();

_context.Series.Add(new Series()
{
Name = "Test",
Library = new Library() {
Name = "Test LIb",
Type = LibraryType.Manga,
},
Volumes = new List<Volume>()
{
EntityFactory.CreateVolume("0", new List<Chapter>()
{
EntityFactory.CreateChapter("1", false, new List<MangaFile>()),
EntityFactory.CreateChapter("2", false, new List<MangaFile>()),
}),
EntityFactory.CreateVolume("2", new List<Chapter>()
{
EntityFactory.CreateChapter("0", false, new List<MangaFile>()),
}),
EntityFactory.CreateVolume("3", new List<Chapter>()
{
EntityFactory.CreateChapter("31", false, new List<MangaFile>()),
}),
}
});

await _context.SaveChangesAsync();

var detail = await _seriesService.GetSeriesDetail(1, 1);
Assert.NotEmpty(detail.Chapters);
// volume 2 has a 0 chapter aka a single chapter that is represented as a volume. We don't show in Chapters area
Assert.Equal(3, detail.Chapters.Count());

Assert.NotEmpty(detail.Volumes);
Assert.Equal(2, detail.Volumes.Count());

Assert.Equal(string.Empty, detail.Chapters.First().VolumeTitle); // loose leaf chapter
Assert.Equal("Volume 3", detail.Chapters.Last().VolumeTitle); // volume based chapter
}

[Fact]
public async Task SeriesDetail_ShouldReturnChaptersOnly_WhenBookLibrary()
{
Expand Down Expand Up @@ -700,7 +747,7 @@ public async Task UpdateSeriesMetadata_ShouldRemoveExistingTags()

var series = await _unitOfWork.SeriesRepository.GetSeriesByIdAsync(1);
Assert.NotNull(series.Metadata);
Assert.True(series.Metadata.Genres.Select(g => g.Title).All(g => g == "New Genre".SentenceCase()));
Assert.True(series.Metadata.Genres.Select(g1 => g1.Title).All(g2 => g2 == "New Genre".SentenceCase()));
Assert.False(series.Metadata.GenresLocked); // GenreLocked is false unless the UI Explicitly says it should be locked
}

Expand Down
1 change: 1 addition & 0 deletions API.Tests/Services/SiteThemeServiceTests.cs
Expand Up @@ -7,6 +7,7 @@
using API.Entities;
using API.Entities.Enums;
using API.Entities.Enums.Theme;
using API.Entities.Enums.UserPreferences;
using API.Helpers;
using API.Services;
using API.Services.Tasks;
Expand Down

0 comments on commit 6d0b18c

Please sign in to comment.