mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 18:13:47 +00:00
Added detailed plugin information to the plugins page (#1013)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
b371b3d54f
commit
f912af321f
26 files changed
+884
-95
No files matched your search
@@ -0,0 +1,11 @@
|
||||
<tr>
|
||||
<td style="width: 210px;">
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2">
|
||||
<MudIcon Icon="@this.Icon" Size="Size.Small"/>
|
||||
<MudText Typo="Typo.body2"><b>@this.Label</b></MudText>
|
||||
</MudStack>
|
||||
</td>
|
||||
<td>
|
||||
@this.ChildContent
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,32 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Components;
|
||||
|
||||
/// <summary>
|
||||
/// One row of a table that shows information: an icon and a label in the first cell, the value in the
|
||||
/// second.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Place it inside the body of a MudSimpleTable. The value is free content, so a row may hold buttons
|
||||
/// next to its text.
|
||||
/// </remarks>
|
||||
public partial class InfoTableRow : ComponentBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The icon in front of the label.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public string Icon { get; set; } = Icons.Material.Filled.Info;
|
||||
|
||||
/// <summary>
|
||||
/// The label, which names what the row shows.
|
||||
/// </summary>
|
||||
[Parameter, EditorRequired]
|
||||
public string Label { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The value of the row.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public RenderFragment? ChildContent { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
@using AIStudio.Tools.PluginSystem
|
||||
@inherits MSGComponentBase
|
||||
|
||||
@if (PluginLinks.TryParse(this.Url, out var link) && !PluginLinks.IsPlaceholder(this.Url))
|
||||
{
|
||||
if (PluginLinks.IsMail(link))
|
||||
{
|
||||
<MudTooltip Text="@T("Send a mail")">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Email" Href="@link.AbsoluteUri" Target="_blank" Size="@this.Size"/>
|
||||
</MudTooltip>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudTooltip Text="@T("Open website")">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.OpenInBrowser" Href="@link.AbsoluteUri" Target="_blank" Size="@this.Size"/>
|
||||
</MudTooltip>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Opens a link from the metadata of a plugin: a website in the browser, or a new mail in the mail
|
||||
/// program.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The button only appears when there is something to open. A support contact may be plain text, such as
|
||||
/// a name or a phone number, and the links which the Assistant Builder fills in for every plugin tell
|
||||
/// nothing about the plugin itself. A disabled button would only leave the user wondering why it cannot
|
||||
/// be clicked.
|
||||
/// </remarks>
|
||||
public partial class PluginLinkButton : MSGComponentBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The text to link, as the plugin states it.
|
||||
/// </summary>
|
||||
[Parameter, EditorRequired]
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The size of the button.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public Size Size { get; set; } = Size.Medium;
|
||||
}
|
||||
Reference in new issue
Block a user