Added a home page prompt for missing API keys of enterprise providers (#1056)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Dominic NeuburgandThorsten Sommer authored and GitHub committed 2026-10-19 09:12:12 +02:00
1 parent 1f8d72aa45
commit 7d35536c87
29 files changed
+920 -31

No files matched your search

@@ -0,0 +1,33 @@
@inherits MSGComponentBase
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Key" IconColor="Color.Warning" HeaderText="@this.Title" IsExpanded="@this.IsExpanded" ExpandedChanged="@this.ExpandedChanged">
@if (this.Group.Prompt is not null)
{
<MudJustifiedMarkdown Value="@this.Group.Prompt.Markdown"/>
}
else
{
<MudText Typo="Typo.body1" Class="mb-3">
@T("Your organization has set up AI providers for you. To use them, AI Studio needs your personal API key. Please enter it below.")
</MudText>
}
<SecretInputField Secret="@this.apiKey" SecretChanged="@(value => this.apiKey = value)" Label="@T("API key")"/>
@if (!string.IsNullOrWhiteSpace(this.issue))
{
<MudAlert Severity="Severity.Error" Variant="Variant.Outlined" Dense="@true" Class="mb-3">
@this.issue
</MudAlert>
}
<MudStack Row="@true" AlignItems="AlignItems.Center">
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@Icons.Material.Filled.Save" Disabled="@(this.isBusy || string.IsNullOrWhiteSpace(this.apiKey))" OnClick="@this.StoreAPIKeyAsync">
@T("Check and save API key")
</MudButton>
@if (this.isBusy)
{
<MudProgressCircular Size="Size.Small" Indeterminate="@true"/>
}
</MudStack>
</ExpansionPanel>