2026-10-19 09:12:12 +02:00
|
|
|
@inherits MSGComponentBase
|
|
|
|
|
|
2026-11-11 14:20:49 +01:00
|
|
|
<ExpansionPanel HeaderIcon="@AppIcons.KEY" IconColor="Color.Warning" HeaderText="@this.Title" IsExpanded="@this.IsExpanded" ExpandedChanged="@this.ExpandedChanged">
|
2026-10-19 09:12:12 +02:00
|
|
|
@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">
|
2026-11-11 14:20:49 +01:00
|
|
|
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@AppIcons.SAVE" Disabled="@(this.isBusy || string.IsNullOrWhiteSpace(this.apiKey))" OnClick="@this.StoreAPIKeyAsync">
|
2026-10-19 09:12:12 +02:00
|
|
|
@T("Check and save API key")
|
|
|
|
|
</MudButton>
|
|
|
|
|
@if (this.isBusy)
|
|
|
|
|
{
|
|
|
|
|
<MudProgressCircular Size="Size.Small" Indeterminate="@true"/>
|
|
|
|
|
}
|
|
|
|
|
</MudStack>
|
|
|
|
|
</ExpansionPanel>
|