Enhanced enterprise config support (#666)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-02-19 20:43:47 +01:00
1 parent 6e33c361dc
commit b445600a52
31 files changed
+733 -426

No files matched your search

@@ -0,0 +1,10 @@
<div style="display: flex; align-items: center; gap: 8px; @this.Item.Style">
<MudIcon Icon="@this.Item.Icon"/>
<span>
@this.Item.Text
</span>
@if (!string.IsNullOrWhiteSpace(this.Item.CopyValue))
{
<MudCopyClipboardButton TooltipMessage="@this.Item.CopyTooltip" StringContent="@this.Item.CopyValue"/>
}
</div>
@@ -0,0 +1,9 @@
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class ConfigInfoRow : ComponentBase
{
[Parameter]
public ConfigInfoRowItem Item { get; set; } = new(Icons.Material.Filled.ArrowRightAlt, string.Empty, string.Empty, string.Empty, string.Empty);
}
@@ -0,0 +1,9 @@
namespace AIStudio.Components;
public sealed record ConfigInfoRowItem(
string Icon,
string Text,
string CopyValue,
string CopyTooltip,
string Style = ""
);
@@ -0,0 +1,21 @@
<MudPaper Outlined="true" Class="@this.Class">
<div style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px;">
<MudIcon Icon="@this.HeaderIcon" Size="Size.Small"/>
<MudText Typo="Typo.subtitle2">
@this.HeaderText
</MudText>
</div>
@foreach (var item in this.Items)
{
<ConfigInfoRow Item="@item"/>
}
@if (this.ShowWarning)
{
<div style="display: flex; align-items: center; gap: 8px; margin-top: 4px;">
<MudIcon Icon="@Icons.Material.Filled.Warning" Size="Size.Small" Color="Color.Warning"/>
<MudText Typo="Typo.subtitle2">@this.WarningText</MudText>
</div>
}
</MudPaper>
@@ -0,0 +1,24 @@
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class ConfigPluginInfoCard : ComponentBase
{
[Parameter]
public string HeaderIcon { get; set; } = Icons.Material.Filled.Extension;
[Parameter]
public string HeaderText { get; set; } = string.Empty;
[Parameter]
public IEnumerable<ConfigInfoRowItem> Items { get; set; } = [];
[Parameter]
public bool ShowWarning { get; set; }
[Parameter]
public string WarningText { get; set; } = string.Empty;
[Parameter]
public string Class { get; set; } = "pa-3 mt-2 mb-2";
}
@@ -0,0 +1,15 @@
<MudText Typo="Typo.body1" Class="@this.Class">
<div style="display: flex; align-items: center; gap: 8px;">
<MudIcon Icon="@Icons.Material.Filled.ArrowRightAlt"/>
@if (this.IsConfigured)
{
<MudIcon Icon="@Icons.Material.Filled.CheckCircle" Color="Color.Success" Size="Size.Small"/>
<span>@this.ConfiguredText</span>
}
else
{
<MudIcon Icon="@Icons.Material.Filled.Cancel" Color="Color.Error" Size="Size.Small"/>
<span>@this.NotConfiguredText</span>
}
</div>
</MudText>
@@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class EncryptionSecretInfo : ComponentBase
{
[Parameter]
public bool IsConfigured { get; set; }
[Parameter]
public string ConfiguredText { get; set; } = string.Empty;
[Parameter]
public string NotConfiguredText { get; set; } = string.Empty;
[Parameter]
public string Class { get; set; } = "mt-2 mb-2";
}