2024-07-11 06:27:06 +00:00
|
|
|
<MudTreeView T="ITreeItem<string>" Items="@this.treeItems" MultiSelection="@false" Hover="@true" ExpandOnClick="@true">
|
2024-07-09 18:25:48 +00:00
|
|
|
<ItemTemplate Context="item">
|
|
|
|
@switch (item)
|
|
|
|
{
|
|
|
|
case TreeDivider<string>:
|
|
|
|
<li style="min-height: 1em;">
|
|
|
|
<MudDivider Style="margin-top: 1em; width: 90%; border-width: 3pt;"/>
|
|
|
|
</li>
|
|
|
|
break;
|
|
|
|
|
|
|
|
case TreeItemData<string> treeItem:
|
2024-07-10 17:27:49 +00:00
|
|
|
@if (treeItem.IsChat)
|
|
|
|
{
|
|
|
|
<MudTreeViewItem T="ITreeItem<string>" Icon="@treeItem.Icon" Value="@item" LoadingIconColor="@Color.Info" CanExpand="@treeItem.Expandable" Items="@treeItem.Children" OnClick="() => this.LoadChat(treeItem.Value)">
|
|
|
|
<BodyContent>
|
|
|
|
<div style="display: grid; grid-template-columns: 1fr auto; align-items: center; width: 100%">
|
|
|
|
<MudText Style="justify-self: start;">@treeItem.Text</MudText>
|
2024-07-09 18:25:48 +00:00
|
|
|
<div style="justify-self: end;">
|
|
|
|
<MudIconButton Icon="@Icons.Material.Filled.Edit" Size="Size.Medium" Color="Color.Inherit"/>
|
|
|
|
<MudIconButton Icon="@Icons.Material.Filled.Delete" Size="Size.Medium" Color="Color.Inherit"/>
|
|
|
|
</div>
|
2024-07-10 17:27:49 +00:00
|
|
|
</div>
|
|
|
|
</BodyContent>
|
|
|
|
</MudTreeViewItem>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<MudTreeViewItem T="ITreeItem<string>" Icon="@treeItem.Icon" Value="@item" LoadingIconColor="@Color.Info" CanExpand="@treeItem.Expandable" Items="@treeItem.Children">
|
|
|
|
<BodyContent>
|
|
|
|
<div style="display: grid; grid-template-columns: 1fr auto; align-items: center; width: 100%">
|
|
|
|
<MudText Style="justify-self: start;">@treeItem.Text</MudText>
|
|
|
|
</div>
|
|
|
|
</BodyContent>
|
|
|
|
</MudTreeViewItem>
|
|
|
|
}
|
2024-07-09 18:25:48 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case TreeButton<string> treeButton:
|
|
|
|
<li>
|
|
|
|
<div class="mud-treeview-item-content" style="background-color: unset;">
|
|
|
|
<div class="mud-treeview-item-arrow"></div>
|
|
|
|
<MudButton StartIcon="@treeButton.Icon" Variant="Variant.Filled">
|
|
|
|
@treeButton.Text
|
|
|
|
</MudButton>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
</ItemTemplate>
|
|
|
|
</MudTreeView>
|