[CHANGE] Fixed storing account/channel

This commit is contained in:
max
2025-09-22 14:53:41 +02:00
parent 1903cb2938
commit a7baeb0d73
7 changed files with 78 additions and 16 deletions

View File

@@ -29,9 +29,9 @@
<MudTh>Has login</MudTh>
</HeaderContent>
<RowTemplate>
<MudTd>@context.Name</MudTd>
<MudTd>@context.Channel?.Name</MudTd>
<MudTd>@context.Id</MudTd>
<MudTd>@(context.ClientAccount != null)</MudTd>
<MudTd>@(context.HttpCookies.Any())</MudTd>
</RowTemplate>
<NoRecordsContent>
<MudText>No channels found</MudText>

View File

@@ -9,12 +9,12 @@ namespace Manager.App.Components.Pages;
public partial class Channels : ComponentBase
{
private readonly DialogOptions _dialogOptions = new() { BackdropClick = false, CloseButton = true, FullWidth = true, MaxWidth = MaxWidth.ExtraLarge };
private MudTable<ChannelEntity>? _table;
private MudTable<ClientAccountEntity>? _table;
private async Task<TableData<ChannelEntity>> ServerReload(TableState state, CancellationToken token)
private async Task<TableData<ClientAccountEntity>> ServerReload(TableState state, CancellationToken token)
{
var results = await LibraryService.GetChannelsAsync(state.PageSize, state.Page * state.PageSize, token);
return !results.IsSuccess ? new TableData<ChannelEntity>() : new TableData<ChannelEntity> { Items = results.Value, TotalItems = results.Total };
var results = await LibraryService.GetAccountsAsync(null, state.Page * state.PageSize, state.PageSize, token);
return !results.IsSuccess ? new TableData<ClientAccountEntity>() : new TableData<ClientAccountEntity> { Items = results.Value, TotalItems = results.Total };
}
private async Task OnAddAccountDialogAsync()