Custom Cover Images (#499)
* Added some documentation. Removed Require Admin Role from Search Tags. Added Summary to be updated on UpdateTag. * Added Swagger xml doc generation to beef up the documentation. Started adding xml comments to the APIs. This is a needed, slow task for upcoming Plugins system. * Implemented the ability to upload a custom series image to override the existing cover image. Refactored some code out to use ImageService and added more documentation * When a page cache fails, delete cache directory so user can try to reload. * Implemented the ability to lock a series cover image such that after user uploads something, it wont get refreshed by Kavita. * Implemented the ability to reset cover image for series by unlocking * Kick off a series refresh after a cover is unlocked. * Ability to press enter to load a url * Ability to reset selection * Cleaned up cover chooser such that reset is nicer, errors inform user to use file upload, series edit modal now doesn't use scrollable body. Mobile tweaks. CoverImageLocked is now sent to the UI. * More css changes to look better * When no bookmarks, don't show both markups * Fixed issues where images wouldn't refresh after cover image was changed. * Implemented the ability to change the cover images for collection tags. * Added property and API for chapter cover image update * Added UI code to prepare for updating cover image for chapters. need to rearrange components * Moved a ton of code around to separate card related screens into their own module. * Implemented the ability to update a chapter/volume cover image * Refactored action for volume to say edit to reflect modal action * Fixed issue where after editing chapter cover image, the underlying card wouldn't update * Fixed an issue where we were passing volumeId to the reset chapter lock. Changed some logic in volume cover image generation. * Automatically apply when you hit reset cover image
This commit is contained in:
parent
30387bc370
commit
2fd02f0d2b
95 changed files with 3364 additions and 20668 deletions
|
@ -2,6 +2,10 @@
|
|||
|
||||
namespace API.DTOs
|
||||
{
|
||||
/// <summary>
|
||||
/// A Chapter is the lowest grouping of a reading medium. A Chapter contains a set of MangaFiles which represents the underlying
|
||||
/// file (abstracted from type).
|
||||
/// </summary>
|
||||
public class ChapterDto
|
||||
{
|
||||
public int Id { get; init; }
|
||||
|
@ -10,7 +14,7 @@ namespace API.DTOs
|
|||
/// </summary>
|
||||
public string Range { get; init; }
|
||||
/// <summary>
|
||||
/// Smallest number of the Range.
|
||||
/// Smallest number of the Range.
|
||||
/// </summary>
|
||||
public string Number { get; init; }
|
||||
/// <summary>
|
||||
|
@ -22,7 +26,7 @@ namespace API.DTOs
|
|||
/// </summary>
|
||||
public bool IsSpecial { get; init; }
|
||||
/// <summary>
|
||||
/// Used for books/specials to display custom title. For non-specials/books, will be set to <see cref="Range"/>
|
||||
/// Used for books/specials to display custom title. For non-specials/books, will be set to <see cref="Range"/>
|
||||
/// </summary>
|
||||
public string Title { get; init; }
|
||||
/// <summary>
|
||||
|
@ -33,6 +37,13 @@ namespace API.DTOs
|
|||
/// Calculated at API time. Number of pages read for this Chapter for logged in user.
|
||||
/// </summary>
|
||||
public int PagesRead { get; set; }
|
||||
/// <summary>
|
||||
/// If the Cover Image is locked for this entity
|
||||
/// </summary>
|
||||
public bool CoverImageLocked { get; set; }
|
||||
/// <summary>
|
||||
/// Volume Id this Chapter belongs to
|
||||
/// </summary>
|
||||
public int VolumeId { get; init; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
public string Title { get; set; }
|
||||
public string Summary { get; set; }
|
||||
public bool Promoted { get; set; }
|
||||
public bool CoverImageLocked { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace API.DTOs
|
|||
public string SortName { get; init; }
|
||||
public string Summary { get; init; }
|
||||
public int Pages { get; init; }
|
||||
public bool CoverImageLocked { get; set; }
|
||||
/// <summary>
|
||||
/// Sum of pages read from linked Volumes. Calculated at API-time.
|
||||
/// </summary>
|
||||
|
|
|
@ -10,5 +10,6 @@
|
|||
public byte[] CoverImage { get; init; }
|
||||
public int UserRating { get; set; }
|
||||
public string UserReview { get; set; }
|
||||
public bool CoverImageLocked { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
14
API/DTOs/Uploads/UploadFileDto.cs
Normal file
14
API/DTOs/Uploads/UploadFileDto.cs
Normal file
|
@ -0,0 +1,14 @@
|
|||
namespace API.DTOs.Uploads
|
||||
{
|
||||
public class UploadFileDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of the Entity
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// Url of the file to download from (can be null)
|
||||
/// </summary>
|
||||
public string Url { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue