[ADD] Simple views for accounts and channels

This commit is contained in:
max
2025-09-22 15:50:30 +02:00
parent a7baeb0d73
commit a478943792
10 changed files with 180 additions and 79 deletions

View File

@@ -1,37 +1,26 @@
@page "/Channels"
@using Manager.App.Models.Settings
@using Manager.App.Services.System
@using Microsoft.Extensions.Options
@inject ILibraryService LibraryService
@inject IDialogService DialogService
@inject IOptions<LibrarySettings> LibraryOptions
@inject ClientService ClientService
@inject ISnackbar Snackbar
<PageTitle>Channels</PageTitle>
<MudStack Spacing="2">
<MudPaper Elevation="0" Outlined>
<MudStack Row Class="ma-2">
<MudButton IconSize="Size.Small" StartIcon="@Icons.Material.Filled.Add" Variant="Variant.Outlined" OnClick="OnAddAccountDialogAsync">Add account</MudButton>
</MudStack>
</MudPaper>
<MudTable @ref="@_table" ServerData="ServerReload">
<ToolBarContent>
<MudText Typo="Typo.h6">Channels</MudText>
<MudText Typo="Typo.h6">Channels stored in the library</MudText>
<MudSpacer />
<MudTextField T="string" ValueChanged="@(s=>OnSearch(s))" Placeholder="Search" Adornment="Adornment.Start" DebounceInterval="300"
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
</ToolBarContent>
<HeaderContent>
<MudTh>Name</MudTh>
<MudTh>Handle</MudTh>
<MudTh>Channel id</MudTh>
<MudTh>Has login</MudTh>
</HeaderContent>
<RowTemplate>
<MudTd>@context.Channel?.Name</MudTd>
<MudTd>@context.Name</MudTd>
<MudTd>@context.Handle</MudTd>
<MudTd>@context.Id</MudTd>
<MudTd>@(context.HttpCookies.Any())</MudTd>
</RowTemplate>
<NoRecordsContent>
<MudText>No channels found</MudText>