mirror of
https://github.com/lantean-code/qbtmud.git
synced 2025-11-02 04:53:19 +00:00
82 lines
3.1 KiB
Plaintext
82 lines
3.1 KiB
Plaintext
@page "/search"
|
|
@layout OtherLayout
|
|
|
|
<MudToolBar Gutters="false" Dense="true">
|
|
@if (!DrawerOpen)
|
|
{
|
|
<MudIconButton Icon="@Icons.Material.Outlined.NavigateBefore" OnClick="NavigateBack" title="Back to torrent list" />
|
|
<MudDivider Vertical="true" />
|
|
}
|
|
<MudDivider Vertical="true" />
|
|
<MudText Class="pl-5 no-wrap">Search</MudText>
|
|
</MudToolBar>
|
|
|
|
<MudCard Elevation="1" Class="ml-4 mr-4 mb-4">
|
|
<MudCardContent>
|
|
<EditForm Model="Model" OnValidSubmit="DoSearch">
|
|
<MudGrid>
|
|
<MudItem xs="12" md="4">
|
|
<MudTextField T="string" Label="Criteria" @bind-Value="Model.SearchText" Variant="Variant.Outlined" />
|
|
</MudItem>
|
|
<MudItem xs="2" md="3">
|
|
<MudSelect T="string" Label="Categories" @bind-Value="Model.SelectedCategory" Variant="Variant.Outlined">
|
|
@foreach (var (value, name) in Categories)
|
|
{
|
|
<MudSelectItem Value="value">@name</MudSelectItem>
|
|
if (value == "all")
|
|
{
|
|
<MudDivider />
|
|
}
|
|
}
|
|
</MudSelect>
|
|
</MudItem>
|
|
<MudItem xs="2" md="3">
|
|
<MudSelect T="string" Label="Plugins" @bind-Value="Model.SelectedPlugin" Variant="Variant.Outlined">
|
|
<MudSelectItem Value="@("all")">All</MudSelectItem>
|
|
<MudDivider />
|
|
@foreach (var (value, name) in Plugins)
|
|
{
|
|
<MudSelectItem Value="value">@name</MudSelectItem>
|
|
}
|
|
</MudSelect>
|
|
</MudItem>
|
|
<MudItem xs="2" md="2">
|
|
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" EndIcon="@Icons.Material.Filled.Search" Variant="Variant.Filled" Class="mt-6">@(_searchId is null ? "Search" : "Stop")</MudButton>
|
|
</MudItem>
|
|
|
|
</MudGrid>
|
|
</EditForm>
|
|
</MudCardContent>
|
|
</MudCard>
|
|
|
|
<MudTable
|
|
Items="Results"
|
|
T="Lantean.QBitTorrentClient.Models.SearchResult"
|
|
Hover="true"
|
|
FixedHeader="true"
|
|
HeaderClass="table-head-bordered"
|
|
Dense="true"
|
|
Breakpoint="Breakpoint.None"
|
|
Bordered="true"
|
|
Square="true"
|
|
LoadingProgressColor="Color.Info"
|
|
HorizontalScrollbar="true"
|
|
Virtualize="true"
|
|
AllowUnsorted="false"
|
|
SelectOnRowClick="false"
|
|
Class="search-list">
|
|
<HeaderContent>
|
|
<MudTh>Name</MudTh>
|
|
<MudTh>Size</MudTh>
|
|
<MudTh>Seeders</MudTh>
|
|
<MudTh>Leechers</MudTh>
|
|
<MudTh>Search engine</MudTh>
|
|
</HeaderContent>
|
|
<RowTemplate>
|
|
<MudTd DataLabel="Name">@context.FileName</MudTd>
|
|
<MudTd DataLabel="Size">@DisplayHelpers.Size(context.FileSize)</MudTd>
|
|
<MudTd DataLabel="Seeders">@context.Seeders</MudTd>
|
|
<MudTd DataLabel="Leechers">@context.Leechers</MudTd>
|
|
<MudTd DataLabel="Search engine">@context.SiteUrl</MudTd>
|
|
</RowTemplate>
|
|
</MudTable> |