mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 00:19:48 +00:00
Some checks are pending
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
93 lines
5.5 KiB
Plaintext
93 lines
5.5 KiB
Plaintext
@inherits MSGComponentBase
|
|
<MudTreeView T="ITreeItem" Items="@this.treeItems" SelectionMode="SelectionMode.SingleSelection" Hover="@true" ExpandOnClick="@true" Class="ma-3">
|
|
<ItemTemplate Context="item">
|
|
@switch (item.Value)
|
|
{
|
|
case TreeDivider:
|
|
<li style="min-height: 1em;">
|
|
<MudDivider Style="margin-top: 1em; width: 90%; border-width: 3pt;"/>
|
|
</li>
|
|
break;
|
|
|
|
case TreeItemData treeItem:
|
|
@if (treeItem.Type is TreeItemType.CHAT)
|
|
{
|
|
<MudTreeViewItem T="ITreeItem" Icon="@treeItem.Icon" Value="@item.Value" Expanded="@item.Expanded" CanExpand="@treeItem.Expandable" Items="@treeItem.Children" OnClick="() => this.LoadChat(treeItem.Path, true)">
|
|
<BodyContent>
|
|
<div style="display: grid; grid-template-columns: 1fr auto; align-items: center; width: 100%">
|
|
<MudText Style="justify-self: start;">
|
|
@if (string.IsNullOrWhiteSpace(treeItem.Text))
|
|
{
|
|
@T("Empty chat")
|
|
}
|
|
else
|
|
{
|
|
@treeItem.ShortenedText
|
|
}
|
|
</MudText>
|
|
<div style="justify-self: end;">
|
|
|
|
<MudTooltip Text="@T("Move to workspace")" Placement="@WORKSPACE_ITEM_TOOLTIP_PLACEMENT">
|
|
<MudIconButton Icon="@Icons.Material.Filled.MoveToInbox" Size="Size.Medium" Color="Color.Inherit" OnClick="() => this.MoveChat(treeItem.Path)"/>
|
|
</MudTooltip>
|
|
|
|
<MudTooltip Text="@T("Rename")" Placement="@WORKSPACE_ITEM_TOOLTIP_PLACEMENT">
|
|
<MudIconButton Icon="@Icons.Material.Filled.Edit" Size="Size.Medium" Color="Color.Inherit" OnClick="() => this.RenameChat(treeItem.Path)"/>
|
|
</MudTooltip>
|
|
|
|
<MudTooltip Text="@T("Delete")" Placement="@WORKSPACE_ITEM_TOOLTIP_PLACEMENT">
|
|
<MudIconButton Icon="@Icons.Material.Filled.Delete" Size="Size.Medium" Color="Color.Inherit" OnClick="() => this.DeleteChat(treeItem.Path)"/>
|
|
</MudTooltip>
|
|
</div>
|
|
</div>
|
|
</BodyContent>
|
|
</MudTreeViewItem>
|
|
}
|
|
else if (treeItem.Type is TreeItemType.WORKSPACE)
|
|
{
|
|
<MudTreeViewItem T="ITreeItem" Icon="@treeItem.Icon" Value="@item.Value" Expanded="@item.Expanded" 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 style="justify-self: end;">
|
|
<MudTooltip Text="@T("Rename")" Placement="@WORKSPACE_ITEM_TOOLTIP_PLACEMENT">
|
|
<MudIconButton Icon="@Icons.Material.Filled.Edit" Size="Size.Medium" Color="Color.Inherit" OnClick="() => this.RenameWorkspace(treeItem.Path)"/>
|
|
</MudTooltip>
|
|
|
|
<MudTooltip Text="@T("Delete")" Placement="@WORKSPACE_ITEM_TOOLTIP_PLACEMENT">
|
|
<MudIconButton Icon="@Icons.Material.Filled.Delete" Size="Size.Medium" Color="Color.Inherit" OnClick="() => this.DeleteWorkspace(treeItem.Path)"/>
|
|
</MudTooltip>
|
|
</div>
|
|
</div>
|
|
</BodyContent>
|
|
</MudTreeViewItem>
|
|
}
|
|
else
|
|
{
|
|
<MudTreeViewItem T="ITreeItem" Icon="@treeItem.Icon" Value="@item.Value" Expanded="@item.Expanded" 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>
|
|
}
|
|
break;
|
|
|
|
case TreeButton 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" OnClick="treeButton.Action">
|
|
@treeButton.Text
|
|
</MudButton>
|
|
</div>
|
|
</li>
|
|
break;
|
|
}
|
|
</ItemTemplate>
|
|
</MudTreeView> |