feat: add category filters and sync action
This commit is contained in:
1 parent
da44797626
commit
7dc1eea3c0
25 files changed
+1707
-110
No files matched your search
@@ -5,11 +5,11 @@
|
||||
<DialogContent>
|
||||
<MudStack Spacing="3">
|
||||
<MudAlert Severity="Severity.Info">
|
||||
将为 <strong>@SelectedCount</strong> 个频道设置分组
|
||||
将为 <strong>@SelectedCount</strong> 个频道设置分类
|
||||
</MudAlert>
|
||||
|
||||
<MudSelect @bind-Value="selectedGroupId" Label="选择目标分组" Variant="Variant.Outlined" Required="true">
|
||||
<MudSelectItem Value="0">未分组</MudSelectItem>
|
||||
<MudSelect @bind-Value="selectedGroupId" Label="选择目标分类" Variant="Variant.Outlined" Required="true">
|
||||
<MudSelectItem Value="0">未分类</MudSelectItem>
|
||||
@foreach (var g in Groups)
|
||||
{
|
||||
<MudSelectItem Value="@g.Id">@g.Name</MudSelectItem>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
@namespace TelegramPanel.Web.Components.Dialogs
|
||||
@using TelegramPanel.Data.Entities
|
||||
|
||||
<MudDialog>
|
||||
<DialogContent>
|
||||
<MudStack Spacing="3">
|
||||
<MudAlert Severity="Severity.Info">
|
||||
将为 <strong>@SelectedCount</strong> 个群组设置分类
|
||||
</MudAlert>
|
||||
|
||||
<MudSelect @bind-Value="selectedCategoryId" Label="选择目标分类" Variant="Variant.Outlined" Required="true">
|
||||
<MudSelectItem Value="0">未分类</MudSelectItem>
|
||||
@foreach (var category in Categories)
|
||||
{
|
||||
<MudSelectItem Value="@category.Id">@category.Name</MudSelectItem>
|
||||
}
|
||||
</MudSelect>
|
||||
</MudStack>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<MudButton Variant="Variant.Text" Color="Color.Default" OnClick="Cancel">取消</MudButton>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="Confirm">确定</MudButton>
|
||||
</DialogActions>
|
||||
</MudDialog>
|
||||
|
||||
@code
|
||||
{
|
||||
[CascadingParameter] private MudDialogInstance MudDialog { get; set; } = default!;
|
||||
[Parameter] public List<GroupCategory> Categories { get; set; } = new();
|
||||
[Parameter] public int SelectedCount { get; set; }
|
||||
|
||||
private int selectedCategoryId;
|
||||
|
||||
private void Cancel() => MudDialog.Cancel();
|
||||
|
||||
private void Confirm()
|
||||
{
|
||||
MudDialog.Close(DialogResult.Ok(selectedCategoryId));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user