UX Overhaul Part 1 (#3047)
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
This commit is contained in:
parent
5934d516f3
commit
ff79710ac6
324 changed files with 11589 additions and 4598 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
19
API/Entities/Interfaces/IHasCoverImage.cs
Normal file
19
API/Entities/Interfaces/IHasCoverImage.cs
Normal 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; }
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue