mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-12 19:52:10 +00:00
105 lines
4.5 KiB
Plaintext
105 lines
4.5 KiB
Plaintext
@inherits MSGComponentBase
|
|
<MudDialog>
|
|
<DialogContent>
|
|
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
|
@this.IntroductionText @T("Plugins contain code that runs inside AI Studio. Install plugins only when you trust their source.")
|
|
</MudJustifiedText>
|
|
|
|
<MudPaper Class="pa-3 mb-3 border-dashed border rounded-lg">
|
|
<MudText Typo="Typo.h6">
|
|
@this.Preview.Plugin.Name
|
|
</MudText>
|
|
<MudText Typo="Typo.body2" Class="mb-2">
|
|
@this.Preview.Plugin.Description
|
|
</MudText>
|
|
<MudText Typo="Typo.body2">
|
|
@T("Type"): <strong>@this.TypeLabel</strong>
|
|
</MudText>
|
|
<MudText Typo="Typo.body2">
|
|
@T("Version"): <strong>@this.Preview.Plugin.Version</strong>
|
|
</MudText>
|
|
<MudText Typo="Typo.body2">
|
|
@T("Authors"): <strong>@this.AuthorsLabel</strong>
|
|
</MudText>
|
|
@if (!string.IsNullOrWhiteSpace(this.Preview.Plugin.SourceURL))
|
|
{
|
|
<MudText Typo="Typo.body2">
|
|
@T("Source"): <strong>@this.Preview.Plugin.SourceURL</strong>
|
|
</MudText>
|
|
}
|
|
@if (!string.IsNullOrWhiteSpace(this.Preview.Plugin.SupportContact))
|
|
{
|
|
<MudText Typo="Typo.body2">
|
|
@T("Support contact"): <strong>@this.Preview.Plugin.SupportContact</strong>
|
|
</MudText>
|
|
}
|
|
</MudPaper>
|
|
|
|
@if (this.Preview.ConfigurationSummary is { HasAnyContent: true } configurationSummary)
|
|
{
|
|
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Class="mb-3">
|
|
@T("A configuration takes effect right after the installation and has no on/off switch. Please check what it sets up:")
|
|
</MudAlert>
|
|
|
|
@if (configurationSummary.Destinations.Count > 0)
|
|
{
|
|
<MudSimpleTable Dense="@true" Striped="@true" Class="mb-3">
|
|
<thead>
|
|
<tr>
|
|
<th>@T("Sends data to")</th>
|
|
<th>@T("Name")</th>
|
|
<th>@T("Destination")</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var destination in configurationSummary.Destinations)
|
|
{
|
|
<tr>
|
|
<td>@this.DestinationTypeLabel(destination.Type)</td>
|
|
<td>@destination.Name</td>
|
|
<td><strong>@destination.Endpoint</strong></td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</MudSimpleTable>
|
|
}
|
|
|
|
@if (this.ConfigurationContents.Count > 0)
|
|
{
|
|
<MudText Typo="Typo.body2" Class="mb-1">
|
|
@T("It also brings:")
|
|
</MudText>
|
|
<MudList T="string" Class="mb-3">
|
|
@foreach (var content in this.ConfigurationContents)
|
|
{
|
|
<MudListItem T="string" Icon="@Icons.Material.Filled.AddCircleOutline">
|
|
@content
|
|
</MudListItem>
|
|
}
|
|
</MudList>
|
|
}
|
|
}
|
|
|
|
@if (!string.IsNullOrWhiteSpace(this.Preview.Plugin.DeprecationMessage))
|
|
{
|
|
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Class="mb-3">
|
|
@string.Format(T("The authors marked this plugin as deprecated: {0}"), this.Preview.Plugin.DeprecationMessage)
|
|
</MudAlert>
|
|
}
|
|
|
|
@if (this.Preview.ExistingPlugin is { } existingPlugin)
|
|
{
|
|
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Class="mb-3">
|
|
@string.Format(T("This replaces the already installed plugin '{0}'. Version {1} gets replaced by version {2}."), existingPlugin.Name, existingPlugin.Version, this.Preview.Plugin.Version)
|
|
</MudAlert>
|
|
}
|
|
</DialogContent>
|
|
<DialogActions>
|
|
<MudButton OnClick="@this.Cancel" Variant="Variant.Filled">
|
|
@T("Cancel")
|
|
</MudButton>
|
|
<MudButton OnClick="@this.Confirm" Variant="Variant.Filled" Color="Color.Warning">
|
|
@(this.Preview.ReplacesExisting ? T("Replace plugin") : T("Install plugin"))
|
|
</MudButton>
|
|
</DialogActions>
|
|
</MudDialog> |