mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-01 22:07:20 +00:00
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
33 lines
1.3 KiB
Plaintext
33 lines
1.3 KiB
Plaintext
@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> |