Misc Fixes (#1031)

* Changed the default margin for mobile in book reader to 5%

* Fixed a bug where checking for update did no current version validation before sending the update to the UI.

* Added some documentation to the book code

* Changed token expiry to 2 weeks.

* Search bar will by default not have a border outline

* Cleaned up some styles for white mode hovering on search

* Added missing genre search group, reworked some clearing code, fixed click handlers

* Fixed genre property

* Changed the series title to show bookmarks and the edit button will now take you to series

* Fixed up accordion tabpanel color in dark mode

* Fixed a typo of CoverArtist instead of "Cover artist"

* Added some documentation changes

* Fixed a bug where sort options on All-Series wasn't working

* Added a thanks to Palace-Designs who hosts our infrastructure to the readme.

* Fixed a bug where duplicate people for the same role would be returned

* Fixed a bug where when user cleared out input manually, search would retain old search results
This commit is contained in:
Joseph Milazzo 2022-02-04 11:28:58 -08:00 committed by GitHub
parent dc2d5b505f
commit 19e17c85fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 130 additions and 55 deletions

View file

@ -57,8 +57,8 @@ public class VersionUpdaterService : IVersionUpdaterService
private readonly IPresenceTracker _tracker;
private readonly Markdown _markdown = new MarkdownDeep.Markdown();
#pragma warning disable S1075
private static readonly string GithubLatestReleasesUrl = "https://api.github.com/repos/Kareadita/Kavita/releases/latest";
private static readonly string GithubAllReleasesUrl = "https://api.github.com/repos/Kareadita/Kavita/releases";
private const string GithubLatestReleasesUrl = "https://api.github.com/repos/Kareadita/Kavita/releases/latest";
private const string GithubAllReleasesUrl = "https://api.github.com/repos/Kareadita/Kavita/releases";
#pragma warning restore S1075
public VersionUpdaterService(ILogger<VersionUpdaterService> logger, IHubContext<MessageHub> messageHub, IPresenceTracker tracker)
@ -76,10 +76,12 @@ public class VersionUpdaterService : IVersionUpdaterService
/// <summary>
/// Fetches the latest release from Github
/// </summary>
public async Task<UpdateNotificationDto> CheckForUpdate()
/// <returns>Latest update or null if current version is greater than latest update</returns>
public async Task<UpdateNotificationDto?> CheckForUpdate()
{
var update = await GetGithubRelease();
return CreateDto(update);
var dto = CreateDto(update);
return new Version(dto.UpdateVersion) <= new Version(dto.CurrentVersion) ? null : dto;
}
public async Task<IEnumerable<UpdateNotificationDto>> GetAllReleases()