AI-Studio/app/MindWork AI Studio/Pages/Plugins.razor

74 lines
2.9 KiB
Plaintext
Raw Normal View History

2025-03-25 18:24:21 +00:00
@using AIStudio.Tools.PluginSystem
2025-03-23 14:51:56 +00:00
@attribute [Route(Routes.PLUGINS)]
<div class="inner-scrolling-context">
<MudText Typo="Typo.h3" Class="mb-2">
2025-03-25 18:24:21 +00:00
Plugins
</MudText>
<PreviewExperimental ApplyInnerScrollingFix="true"/>
2025-03-25 18:24:21 +00:00
2025-03-23 14:51:56 +00:00
<InnerScrolling>
2025-03-27 06:40:48 +00:00
<MudTable Items="@PluginFactory.AvailablePlugins" Hover="@true" GroupBy="@this.groupConfig" Class="border-dashed border rounded-lg">
<ColGroup>
2025-03-27 15:25:31 +00:00
<col style="width: 2em;" />
2025-03-27 18:24:20 +00:00
<col style="width: 2.1em; "/>
2025-03-27 06:40:48 +00:00
<col/>
<col style="width: 12em;"/>
</ColGroup>
<HeaderContent>
2025-03-27 15:25:31 +00:00
<MudTh colspan="2">Plugins</MudTh>
2025-03-27 06:40:48 +00:00
<MudTh>Actions</MudTh>
</HeaderContent>
<GroupHeaderTemplate>
2025-03-27 15:25:31 +00:00
<MudTh Class="mud-table-cell-custom-group" colspan="3">
2025-03-27 06:40:48 +00:00
@switch (context.Key)
{
case GROUP_ENABLED:
<MudText Typo="Typo.h6" Class="mb-2">
Enabled Plugins
</MudText>
break;
case GROUP_DISABLED:
<MudText Typo="Typo.h6" Class="mb-2">
Disabled Plugins
</MudText>
break;
case GROUP_INTERNAL:
<MudText Typo="Typo.h6" Class="mb-2">
Internal Plugins
</MudText>
break;
}
</MudTh>
</GroupHeaderTemplate>
<RowTemplate>
2025-03-27 15:25:31 +00:00
<MudTd>
2025-03-27 18:24:20 +00:00
<MudAvatar Size="Size.Medium" Style="width: 2em; height: 2em;" Class="align-content-stretch">
2025-03-27 06:40:48 +00:00
<div class="plugin-icon-container">
@((MarkupString)context.IconSVG)
</div>
</MudAvatar>
2025-03-27 15:25:31 +00:00
</MudTd>
<MudTd>
2025-03-27 18:24:20 +00:00
<MudStack Spacing="0">
<MudText Typo="Typo.h6" Class="mb-0 pb-0 gap-0">
2025-03-27 06:40:48 +00:00
@context.Name
2025-03-25 18:24:21 +00:00
</MudText>
2025-03-27 15:25:31 +00:00
<MudText Typo="Typo.body1">
2025-03-27 06:40:48 +00:00
@context.Description
2025-03-27 15:25:31 +00:00
</MudText>
2025-03-27 06:40:48 +00:00
</MudStack>
2025-03-27 15:25:31 +00:00
</MudTd>
<MudTd>
@if (!context.IsInternal)
{
<MudSwitch T="bool" Value="@this.SettingsManager.IsPluginEnabled(context)" ValueChanged="@(_ => this.PluginActivationStateChanged(context))"/>
}
2025-03-27 15:25:31 +00:00
</MudTd>
2025-03-27 06:40:48 +00:00
</RowTemplate>
</MudTable>
2025-03-23 14:51:56 +00:00
</InnerScrolling>
</div>