UX Overhaul Part 1 (#3047)

Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
This commit is contained in:
Robbie Davis 2024-08-09 13:55:31 -04:00 committed by GitHub
parent 5934d516f3
commit ff79710ac6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
324 changed files with 11589 additions and 4598 deletions

View file

@ -10,7 +10,7 @@ namespace API.Entities;
/// <summary>
/// Represents a Collection of Series for a given User
/// </summary>
public class AppUserCollection : IEntityDate
public class AppUserCollection : IEntityDate, IHasCoverImage
{
public int Id { get; set; }
public required string Title { get; set; }
@ -23,11 +23,9 @@ public class AppUserCollection : IEntityDate
/// Reading lists that are promoted are only done by admins
/// </summary>
public bool Promoted { get; set; }
/// <summary>
/// Path to the (managed) image file
/// </summary>
/// <remarks>The file is managed internally to Kavita's APPDIR</remarks>
public string? CoverImage { get; set; }
public string PrimaryColor { get; set; }
public string SecondaryColor { get; set; }
public bool CoverImageLocked { get; set; }
/// <summary>
/// The highest age rating from all Series within the collection

View file

@ -9,7 +9,7 @@ using API.Services.Tasks.Scanner.Parser;
namespace API.Entities;
public class Chapter : IEntityDate, IHasReadTimeEstimate
public class Chapter : IEntityDate, IHasReadTimeEstimate, IHasCoverImage
{
public int Id { get; set; }
/// <summary>
@ -46,11 +46,9 @@ public class Chapter : IEntityDate, IHasReadTimeEstimate
public DateTime CreatedUtc { get; set; }
public DateTime LastModifiedUtc { get; set; }
/// <summary>
/// Relative path to the (managed) image file representing the cover image
/// </summary>
/// <remarks>The file is managed internally to Kavita's APPDIR</remarks>
public string? CoverImage { get; set; }
public string PrimaryColor { get; set; }
public string SecondaryColor { get; set; }
public bool CoverImageLocked { get; set; }
/// <summary>
/// Total number of pages in all MangaFiles

View file

@ -0,0 +1,19 @@
namespace API.Entities.Interfaces;
public interface IHasCoverImage
{
/// <summary>
/// Absolute path to the (managed) image file
/// </summary>
/// <remarks>The file is managed internally to Kavita's APPDIR</remarks>
public string? CoverImage { get; set; }
/// <summary>
/// Primary color derived from the Cover Image
/// </summary>
public string? PrimaryColor { get; set; }
/// <summary>
/// Secondary color derived from the Cover Image
/// </summary>
public string? SecondaryColor { get; set; }
}

View file

@ -5,11 +5,13 @@ using API.Entities.Interfaces;
namespace API.Entities;
public class Library : IEntityDate
public class Library : IEntityDate, IHasCoverImage
{
public int Id { get; set; }
public required string Name { get; set; }
public string? CoverImage { get; set; }
public string PrimaryColor { get; set; }
public string SecondaryColor { get; set; }
public LibraryType Type { get; set; }
/// <summary>
/// If Folder Watching is enabled for this library

View file

@ -10,7 +10,7 @@ namespace API.Entities;
/// <summary>
/// This is a collection of <see cref="ReadingListItem"/> which represent individual chapters and an order.
/// </summary>
public class ReadingList : IEntityDate
public class ReadingList : IEntityDate, IHasCoverImage
{
public int Id { get; init; }
public required string Title { get; set; }
@ -23,11 +23,9 @@ public class ReadingList : IEntityDate
/// Reading lists that are promoted are only done by admins
/// </summary>
public bool Promoted { get; set; }
/// <summary>
/// Absolute path to the (managed) image file
/// </summary>
/// <remarks>The file is managed internally to Kavita's APPDIR</remarks>
public string? CoverImage { get; set; }
public string? PrimaryColor { get; set; }
public string? SecondaryColor { get; set; }
public bool CoverImageLocked { get; set; }
/// <summary>

View file

@ -3,11 +3,10 @@ using System.Collections.Generic;
using API.Entities.Enums;
using API.Entities.Interfaces;
using API.Entities.Metadata;
using API.Extensions;
namespace API.Entities;
public class Series : IEntityDate, IHasReadTimeEstimate
public class Series : IEntityDate, IHasReadTimeEstimate, IHasCoverImage
{
public int Id { get; set; }
/// <summary>
@ -82,6 +81,9 @@ public class Series : IEntityDate, IHasReadTimeEstimate
/// </summary>
public MangaFormat Format { get; set; } = MangaFormat.Unknown;
public string PrimaryColor { get; set; } = string.Empty;
public string SecondaryColor { get; set; } = string.Empty;
public bool SortNameLocked { get; set; }
public bool LocalizedNameLocked { get; set; }

View file

@ -6,7 +6,7 @@ using API.Services.Tasks.Scanner.Parser;
namespace API.Entities;
public class Volume : IEntityDate, IHasReadTimeEstimate
public class Volume : IEntityDate, IHasReadTimeEstimate, IHasCoverImage
{
public int Id { get; set; }
/// <summary>
@ -38,11 +38,10 @@ public class Volume : IEntityDate, IHasReadTimeEstimate
public DateTime CreatedUtc { get; set; }
public DateTime LastModifiedUtc { get; set; }
/// <summary>
/// Absolute path to the (managed) image file
/// </summary>
/// <remarks>The file is managed internally to Kavita's APPDIR</remarks>
public string? CoverImage { get; set; }
public string PrimaryColor { get; set; }
public string SecondaryColor { get; set; }
/// <summary>
/// Total pages of all chapters in this volume
/// </summary>