mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-12 11:41:38 +00:00
Some checks failed
Build and Release / Read metadata (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Has been cancelled
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) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Has been cancelled
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) Has been cancelled
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) Has been cancelled
Build and Release / Prepare & create release (push) Has been cancelled
Build and Release / Publish release (push) Has been cancelled
98 lines
4.3 KiB
Plaintext
98 lines
4.3 KiB
Plaintext
@using AIStudio.Tools.PluginSystem
|
|
@inherits MSGComponentBase
|
|
@attribute [Route(Routes.PLUGINS)]
|
|
|
|
<div class="inner-scrolling-context">
|
|
<MudText Typo="Typo.h3" Class="mb-2">
|
|
@T("Plugins")
|
|
</MudText>
|
|
|
|
<InnerScrolling>
|
|
|
|
<MudTable Items="@PluginFactory.AvailablePlugins" Hover="@true" GroupBy="@this.groupConfig" Class="border-dashed border rounded-lg">
|
|
<ColGroup>
|
|
<col style="width: 2em;" />
|
|
<col style="width: 2.1em; "/>
|
|
<col/>
|
|
<col style="width: 12em;"/>
|
|
</ColGroup>
|
|
<HeaderContent>
|
|
<MudTh colspan="2">@T("Plugins")</MudTh>
|
|
<MudTh>@T("Actions")</MudTh>
|
|
</HeaderContent>
|
|
<GroupHeaderTemplate>
|
|
<MudTh Class="mud-table-cell-custom-group" colspan="3">
|
|
@switch (context.Key)
|
|
{
|
|
case GROUP_ENABLED:
|
|
<MudText Typo="Typo.h6" Class="mb-2">
|
|
@T("Enabled Plugins")
|
|
</MudText>
|
|
break;
|
|
|
|
case GROUP_DISABLED:
|
|
<MudText Typo="Typo.h6" Class="mb-2">
|
|
@T("Disabled Plugins")
|
|
</MudText>
|
|
break;
|
|
|
|
case GROUP_INTERNAL:
|
|
<MudText Typo="Typo.h6" Class="mb-2">
|
|
@T("Internal Plugins")
|
|
</MudText>
|
|
break;
|
|
}
|
|
</MudTh>
|
|
</GroupHeaderTemplate>
|
|
<RowTemplate>
|
|
<MudTd>
|
|
<MudAvatar Size="Size.Medium" Style="width: 2em; height: 2em;" Class="align-content-stretch">
|
|
<div class="plugin-icon-container">
|
|
@((MarkupString)context.IconSVG)
|
|
</div>
|
|
</MudAvatar>
|
|
</MudTd>
|
|
<MudTd>
|
|
<MudStack Spacing="0">
|
|
<MudText Typo="Typo.h6" Class="mb-0 pb-0 gap-0">
|
|
@context.Name
|
|
</MudText>
|
|
<MudText Typo="Typo.body1">
|
|
@context.Description
|
|
</MudText>
|
|
</MudStack>
|
|
</MudTd>
|
|
<MudTd>
|
|
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
|
@if (context is { IsInternal: false, Type: not PluginType.CONFIGURATION })
|
|
{
|
|
var isEnabled = this.SettingsManager.IsPluginEnabled(context);
|
|
<MudTooltip Text="@(isEnabled ? T("Disable plugin") : T("Enable plugin"))">
|
|
<MudSwitch T="bool" Value="@isEnabled" ValueChanged="@(_ => this.PluginActivationStateChanged(context))"/>
|
|
</MudTooltip>
|
|
}
|
|
|
|
@if (context is { IsInternal: false } && !string.IsNullOrWhiteSpace(context.SourceURL))
|
|
{
|
|
var sourceUrl = context.SourceURL;
|
|
var isSendingMail = IsSendingMail(sourceUrl);
|
|
if(isSendingMail)
|
|
{
|
|
<MudTooltip Text="@T("Send a mail")">
|
|
<MudIconButton Icon="@Icons.Material.Filled.Email" Href="@sourceUrl" Target="_blank" Size="Size.Medium"/>
|
|
</MudTooltip>
|
|
}
|
|
else
|
|
{
|
|
<MudTooltip Text="@T("Open website")">
|
|
<MudIconButton Icon="@Icons.Material.Filled.OpenInBrowser" Href="@sourceUrl" Target="_blank" Size="Size.Medium"/>
|
|
</MudTooltip>
|
|
}
|
|
}
|
|
</MudStack>
|
|
</MudTd>
|
|
</RowTemplate>
|
|
</MudTable>
|
|
</InnerScrolling>
|
|
</div>
|