27522c1e1c
- Theming adjustments (still needs a lot of work)
34 lines
839 B
C#
34 lines
839 B
C#
using DeepDrftModels.Entities;
|
|
using DeepDrftModels.Models;
|
|
using DeepDrftWeb.Client.Clients;
|
|
|
|
namespace DeepDrftWeb.Client.ViewModels;
|
|
|
|
public class TracksViewModel
|
|
{
|
|
public TrackClient TrackClient { get; }
|
|
|
|
// private int _pageNumber = 1;
|
|
public int PageNumber { get; set; } = 1;
|
|
|
|
public int PageSize
|
|
{
|
|
get => Page?.PageSize ?? 15;
|
|
set
|
|
{
|
|
if (Page == null) throw new Exception();
|
|
if (value != Page.PageSize)
|
|
{
|
|
Page.PageSize = value;
|
|
}
|
|
}
|
|
}
|
|
public string SortBy { get; set; } = string.Empty;
|
|
public bool IsDescending { get; set; } = false;
|
|
public PagedResult<TrackEntity>? Page { get; set; } = null;
|
|
|
|
public TracksViewModel(TrackClient trackClient)
|
|
{
|
|
TrackClient = trackClient;
|
|
}
|
|
} |