mirror of
https://github.com/lantean-code/qbtmud.git
synced 2025-10-23 04:52:22 +00:00
Update project name and namespaces
This commit is contained in:
39
Lantean.QBTMud/Pages/CategoryManagement.razor
Normal file
39
Lantean.QBTMud/Pages/CategoryManagement.razor
Normal file
@@ -0,0 +1,39 @@
|
||||
@page "/categories"
|
||||
@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" />
|
||||
}
|
||||
<MudText Class="px-5 no-wrap">Categories</MudText>
|
||||
<MudDivider Vertical="true" />
|
||||
<MudIconButton Icon="@Icons.Material.Filled.PlaylistAdd" OnClick="AddCategory" title="Add Category" />
|
||||
</MudToolBar>
|
||||
|
||||
<DynamicTable @ref="Table"
|
||||
T="Category"
|
||||
ColumnDefinitions="Columns"
|
||||
Items="Results"
|
||||
MultiSelection="false"
|
||||
SelectOnRowClick="false"
|
||||
Class="details-list" />
|
||||
|
||||
@code {
|
||||
private RenderFragment<RowContext<Category>> ActionsColumn
|
||||
{
|
||||
get
|
||||
{
|
||||
return context => __builder =>
|
||||
{
|
||||
var value = (Category?)context.GetValue();
|
||||
<MudButtonGroup>
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Edit" Color="Color.Warning" OnClick="@(e => EditCategory(value?.Name))" />
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" OnClick="@(e => DeleteCategory(value?.Name))" />
|
||||
</MudButtonGroup>
|
||||
;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user