Front End Track Gallery Controls

- Theming adjustments (still needs a lot of work)
This commit is contained in:
daniel-c-harvey
2025-09-04 14:18:35 -04:00
parent 5050074f4f
commit 27522c1e1c
11 changed files with 224 additions and 77 deletions
@@ -0,0 +1,29 @@
using DeepDrftModels.Entities;
using DeepDrftModels.Models;
using DeepDrftWeb.Client.ViewModels;
using Microsoft.AspNetCore.Components;
namespace DeepDrftWeb.Client.Pages;
public partial class TracksView : ComponentBase
{
[Inject]
public required TracksViewModel ViewModel { get; set; }
protected override async Task OnInitializedAsync()
{
await SetPage(1);
}
private async Task SetPage(int newPage)
{
var result = await ViewModel.TrackClient.GetPage(newPage, ViewModel.PageSize, ViewModel.SortBy, ViewModel.IsDescending);
if (result is { Success: true, Value: PagedResult<TrackEntity> pageResult })
{
ViewModel.Page = pageResult;
ViewModel.PageSize = pageResult.PageSize;
}
}
}