In-Depth Filtering (#850)

* Laying the foundation for the filter rework

* Filtering by Genre is now possible.

* Cleaned up code and preparing for People filtering

* People filtering is hooked up for the frontend

* Filtering now works. On Deck does not work with filtering currently due to a unique implementation.

* More cleanup

* Implemented the ability to reset the filters

* Added a mobile drawer for filtering

* Added some additional cases for NaturalSortComparer. Filter now uses a drawer on smaller screens.

* Fixed a bug where backup service was not pointing to the correct directory.

* Undid the fix, it's working as expected
This commit is contained in:
Joseph Milazzo 2021-12-15 10:23:10 -06:00 committed by GitHub
parent ca893930d3
commit 28688ada8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 2354 additions and 187 deletions

View file

@ -1,5 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using API.Data.Migrations;
using API.Entities;
using API.Entities.Enums;
namespace API.DTOs.Filtering
@ -11,5 +13,64 @@ namespace API.DTOs.Filtering
/// </summary>
public IList<MangaFormat> Formats { get; init; } = new List<MangaFormat>();
/// <summary>
/// The progress you want to be returned. This can be bitwise manipulated. Defaults to all applicable states.
/// </summary>
public ReadStatus ReadStatus { get; init; } = new ReadStatus();
/// <summary>
/// A list of library ids to restrict search to. Defaults to all libraries by passing empty list
/// </summary>
public IList<int> Libraries { get; init; } = new List<int>();
/// <summary>
/// A list of Genre ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Genres { get; init; } = new List<int>();
/// <summary>
/// A list of Writers to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Writers { get; init; } = new List<int>();
/// <summary>
/// A list of Penciller ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Penciller { get; init; } = new List<int>();
/// <summary>
/// A list of Inker ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Inker { get; init; } = new List<int>();
/// <summary>
/// A list of Colorist ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Colorist { get; init; } = new List<int>();
/// <summary>
/// A list of Letterer ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Letterer { get; init; } = new List<int>();
/// <summary>
/// A list of CoverArtist ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> CoverArtist { get; init; } = new List<int>();
/// <summary>
/// A list of Editor ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Editor { get; init; } = new List<int>();
/// <summary>
/// A list of Publisher ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Publisher { get; init; } = new List<int>();
/// <summary>
/// A list of Character ids to restrict search to. Defaults to all genres by passing an empty list
/// </summary>
public IList<int> Character { 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>
/// Will return back everything with the rating and above
/// <see cref="AppUserRating.Rating"/>
/// </summary>
public int Rating { get; init; }
}
}

View file

@ -0,0 +1,13 @@
using System;
namespace API.DTOs.Filtering;
/// <summary>
/// Represents the Reading Status. This is a flag and allows multiple statues
/// </summary>
public class ReadStatus
{
public bool NotRead { get; set; } = false;
public bool InProgress { get; set; } = false;
public bool Read { get; set; } = false;
}