Side Nav Redesign (#2310)

This commit is contained in:
Joe Milazzo 2023-10-14 10:07:53 -05:00 committed by GitHub
parent 5c2ebb87cc
commit 00dddaefae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 5971 additions and 572 deletions

View file

@ -76,6 +76,11 @@ public class AppUser : IdentityUser<int>, IHasConcurrencyToken
/// An ordered list of Streams (pre-configured) or Smart Filters that makes up the User's Dashboard
/// </summary>
public IList<AppUserDashboardStream> DashboardStreams { get; set; } = null!;
/// <summary>
/// An ordered list of Streams (pre-configured) or Smart Filters that makes up the User's SideNav
/// </summary>
public IList<AppUserSideNavStream> SideNavStreams { get; set; } = null!;
public IList<AppUserExternalSource> ExternalSources { get; set; } = null!;
/// <inheritdoc />

View file

@ -0,0 +1,12 @@
namespace API.Entities;
public class AppUserExternalSource
{
public int Id { get; set; }
public required string Name { get; set; }
public required string Host { get; set; }
public required string ApiKey { get; set; }
public int AppUserId { get; set; }
public AppUser AppUser { get; set; }
}

View file

@ -0,0 +1,34 @@
namespace API.Entities;
public class AppUserSideNavStream
{
public int Id { get; set; }
public required string Name { get; set; }
/// <summary>
/// Is System Provided
/// </summary>
public bool IsProvided { get; set; }
/// <summary>
/// Sort Order on the Dashboard
/// </summary>
public int Order { get; set; }
/// <summary>
/// Library Id is for StreamType.Library only
/// </summary>
public int? LibraryId { get; set; }
/// <summary>
/// Only set for StreamType.ExternalSource
/// </summary>
public int? ExternalSourceId { get; set; }
/// <summary>
/// For system provided
/// </summary>
public SideNavStreamType StreamType { get; set; }
public bool Visible { get; set; }
/// <summary>
/// If Not IsProvided, the appropriate smart filter
/// </summary>
public AppUserSmartFilter? SmartFilter { get; set; }
public int AppUserId { get; set; }
public AppUser AppUser { get; set; }
}

View file

@ -0,0 +1,13 @@
namespace API.Entities;
public enum SideNavStreamType
{
Collections = 1,
ReadingLists = 2,
Bookmarks = 3,
Library = 4,
SmartFilter = 5,
ExternalSource = 6,
AllSeries = 7,
WantToRead = 8,
}