More Filtering and Support for ComicInfo v2.1 (draft) Tags (#851)
* Added a reoccuring task to cleanup db entries that might be abandoned. On library page, the Library in question will be prepoulated. * Laid out the foundation for customized sorting. Added all series page to the UI when clicking on Libraries section header on home page so user can apply any filtering they like. * When filtering, the current library filter will now automatically filter out the options for people and genres. * Implemented Sorting controls * Clear now clears sorting and read progress. Sorting is disabled on deck and recently added. * Fixed an issue where all-series page couldn't click to open series * Don't let the user unselect the last read progress. Added new comicinfo v2.1 draft tags. * Hooked in Translator tag into backend and UI. * Fixed an issue where you could open multiple typeaheads at the same time * Integrated Translator and Tags ComicInfo extension fields. Started work on a badge expander. * Reworked a bit more on badge expander. Added the UI code for Age Rating and Tags * Integrated backend for Tags, Translator, and Age Rating * Metadata tags now collapse if more than 4 present * Some code cleanup * Made the not read badge slightly smaller
This commit is contained in:
parent
21da5d8134
commit
94bad97511
71 changed files with 4324 additions and 207 deletions
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using API.DTOs.Metadata;
|
||||
using API.Entities;
|
||||
|
||||
namespace API.DTOs
|
||||
{
|
||||
|
|
@ -68,5 +70,7 @@ namespace API.DTOs
|
|||
public ICollection<PersonDto> CoverArtist { get; set; } = new List<PersonDto>();
|
||||
public ICollection<PersonDto> Editor { get; set; } = new List<PersonDto>();
|
||||
public ICollection<PersonDto> Publisher { get; set; } = new List<PersonDto>();
|
||||
public ICollection<PersonDto> Translators { get; set; } = new List<PersonDto>();
|
||||
public ICollection<TagDto> Tags { get; set; } = new List<TagDto>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using API.Data.Migrations;
|
||||
using System.Collections.Generic;
|
||||
using API.Entities;
|
||||
using API.Entities.Enums;
|
||||
|
||||
|
|
@ -63,14 +61,34 @@ namespace API.DTOs.Filtering
|
|||
/// </summary>
|
||||
public IList<int> Character { get; init; } = new List<int>();
|
||||
/// <summary>
|
||||
/// A list of Translator ids to restrict search to. Defaults to all genres by passing an empty list
|
||||
/// </summary>
|
||||
public IList<int> Translators { get; init; } = new List<int>();
|
||||
/// <summary>
|
||||
/// A list of Collection Tag ids to restrict search to. Defaults to all genres by passing an empty list
|
||||
/// </summary>
|
||||
public IList<int> CollectionTags { get; init; } = new List<int>();
|
||||
/// <summary>
|
||||
/// A list of Tag ids to restrict search to. Defaults to all genres by passing an empty list
|
||||
/// </summary>
|
||||
public IList<int> Tags { get; init; } = new List<int>();
|
||||
/// <summary>
|
||||
/// Will return back everything with the rating and above
|
||||
/// <see cref="AppUserRating.Rating"/>
|
||||
/// </summary>
|
||||
public int Rating { get; init; }
|
||||
/// <summary>
|
||||
/// Sorting Options for a query. Defaults to null, which uses the queries natural sorting order
|
||||
/// </summary>
|
||||
public SortOptions SortOptions { get; init; } = null;
|
||||
/// <summary>
|
||||
/// Age Ratings. Empty list will return everything back
|
||||
/// </summary>
|
||||
public IList<AgeRating> AgeRating { get; init; } = new List<AgeRating>();
|
||||
/// <summary>
|
||||
/// Languages (ISO 639-1 code) to filter by. Empty list will return everything back
|
||||
/// </summary>
|
||||
public IList<string> Languages { get; init; } = new List<string>();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
7
API/DTOs/Filtering/LanguageDto.cs
Normal file
7
API/DTOs/Filtering/LanguageDto.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace API.DTOs.Filtering;
|
||||
|
||||
public class LanguageDto
|
||||
{
|
||||
public string IsoCode { get; set; }
|
||||
public string Title { get; set; }
|
||||
}
|
||||
8
API/DTOs/Filtering/SortField.cs
Normal file
8
API/DTOs/Filtering/SortField.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
namespace API.DTOs.Filtering;
|
||||
|
||||
public enum SortField
|
||||
{
|
||||
SortName = 1,
|
||||
CreatedDate = 2,
|
||||
LastModifiedDate = 3,
|
||||
}
|
||||
10
API/DTOs/Filtering/SortOptions.cs
Normal file
10
API/DTOs/Filtering/SortOptions.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
namespace API.DTOs.Filtering;
|
||||
|
||||
/// <summary>
|
||||
/// Sorting Options for a query
|
||||
/// </summary>
|
||||
public class SortOptions
|
||||
{
|
||||
public SortField SortField { get; set; }
|
||||
public bool IsAscending { get; set; } = true;
|
||||
}
|
||||
9
API/DTOs/Metadata/AgeRatingDto.cs
Normal file
9
API/DTOs/Metadata/AgeRatingDto.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using API.Entities.Enums;
|
||||
|
||||
namespace API.DTOs.Metadata;
|
||||
|
||||
public class AgeRatingDto
|
||||
{
|
||||
public AgeRating Value { get; set; }
|
||||
public string Title { get; set; }
|
||||
}
|
||||
|
|
@ -4,6 +4,5 @@
|
|||
{
|
||||
public int Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
7
API/DTOs/Metadata/TagDto.cs
Normal file
7
API/DTOs/Metadata/TagDto.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace API.DTOs.Metadata;
|
||||
|
||||
public class TagDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
}
|
||||
|
|
@ -9,8 +9,18 @@ namespace API.DTOs
|
|||
{
|
||||
public int Id { get; set; }
|
||||
public string Summary { get; set; }
|
||||
public ICollection<CollectionTagDto> Tags { get; set; }
|
||||
/// <summary>
|
||||
/// Collections the Series belongs to
|
||||
/// </summary>
|
||||
public ICollection<CollectionTagDto> CollectionTags { get; set; }
|
||||
/// <summary>
|
||||
/// Genres for the Series
|
||||
/// </summary>
|
||||
public ICollection<GenreTagDto> Genres { get; set; }
|
||||
/// <summary>
|
||||
/// Collection of all Tags from underlying chapters for a Series
|
||||
/// </summary>
|
||||
public ICollection<TagDto> Tags { get; set; }
|
||||
public ICollection<PersonDto> Writers { get; set; } = new List<PersonDto>();
|
||||
public ICollection<PersonDto> Artists { get; set; } = new List<PersonDto>();
|
||||
public ICollection<PersonDto> Publishers { get; set; } = new List<PersonDto>();
|
||||
|
|
@ -20,6 +30,7 @@ namespace API.DTOs
|
|||
public ICollection<PersonDto> Colorists { get; set; } = new List<PersonDto>();
|
||||
public ICollection<PersonDto> Letterers { get; set; } = new List<PersonDto>();
|
||||
public ICollection<PersonDto> Editors { get; set; } = new List<PersonDto>();
|
||||
public ICollection<PersonDto> Translators { get; set; } = new List<PersonDto>();
|
||||
/// <summary>
|
||||
/// Highest Age Rating from all Chapters
|
||||
/// </summary>
|
||||
|
|
@ -28,6 +39,10 @@ namespace API.DTOs
|
|||
/// Earliest Year from all chapters
|
||||
/// </summary>
|
||||
public int ReleaseYear { get; set; }
|
||||
/// <summary>
|
||||
/// Language of the content (ISO 639-1 code)
|
||||
/// </summary>
|
||||
public string Language { get; set; } = string.Empty;
|
||||
|
||||
public int SeriesId { get; set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue