mirror of
https://github.com/lantean-code/qbtmud.git
synced 2025-10-23 04:52:22 +00:00
64 lines
2.7 KiB
Plaintext
64 lines
2.7 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>
|
|
<MudDivider Vertical="true" />
|
|
<MudIconButton Icon="@Icons.Material.Outlined.Settings" OnClick="ShowSearchPlugins" title="Search plugins" />
|
|
</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="12" 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="12" md="3">
|
|
<MudSelect T="string" Label="Plugins" @bind-Value="Model.SelectedPlugin" Variant="Variant.Outlined">
|
|
<MudSelectItem Value="@("all")">All</MudSelectItem>
|
|
@if (Plugins.Count > 0)
|
|
{
|
|
<MudDivider />
|
|
|
|
}
|
|
@foreach (var (value, name) in Plugins)
|
|
{
|
|
<MudSelectItem Value="value">@name</MudSelectItem>
|
|
}
|
|
</MudSelect>
|
|
</MudItem>
|
|
<MudItem xs="12" 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>
|
|
|
|
<DynamicTable @ref="Table"
|
|
T="Lantean.QBitTorrentClient.Models.SearchResult"
|
|
ColumnDefinitions="Columns"
|
|
Items="Results"
|
|
MultiSelection="false"
|
|
SelectOnRowClick="false"
|
|
Class="search-list" /> |