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">
|
2025-03-25 19:50:57 +00:00
|
|
|
<MudText Typo="Typo.h3" Class="mb-2">
|
2025-03-25 18:24:21 +00:00
|
|
|
Plugins
|
|
|
|
</MudText>
|
2025-03-25 19:50:57 +00:00
|
|
|
<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>
|
2025-03-27 20:07:39 +00:00
|
|
|
@if (!context.IsInternal)
|
|
|
|
{
|
2025-03-29 17:34:14 +00:00
|
|
|
var isEnabled = this.SettingsManager.IsPluginEnabled(context);
|
|
|
|
<MudTooltip Text="@(isEnabled ? "Disable plugin" : "Enable plugin")">
|
|
|
|
<MudSwitch T="bool" Value="@isEnabled" ValueChanged="@(_ => this.PluginActivationStateChanged(context))"/>
|
|
|
|
</MudTooltip>
|
2025-03-27 20:07:39 +00:00
|
|
|
}
|
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>
|