mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-25 00:13:48 +00:00
Added a check for characters which an API key cannot contain (#1227)
This commit is contained in:
1 parent
c72a1948b3
commit
e5a7f5423f
40 files changed
+1179
-71
No files matched your search
@@ -7,12 +7,12 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudText Typo="Typo.body1" Class="mb-3">
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
|
||||
@TA("Your organization has set up AI providers for you. To use them, AI Studio needs your personal API key. Please enter it below.")
|
||||
</MudText>
|
||||
</MudJustifiedText>
|
||||
}
|
||||
|
||||
<SecretInputField Secret="@this.apiKey" SecretChanged="@(value => this.apiKey = value)" Label="@T("API key")"/>
|
||||
<SecretInputField Secret="@this.apiKey" SecretChanged="@(value => this.apiKey = value)" Label="@T("API key")" Validation="@ValidateAPIKey"/>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(this.issue))
|
||||
{
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
<MudStack Row="@true" AlignItems="AlignItems.Center">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@AppIcons.SAVE" Disabled="@(this.isBusy || string.IsNullOrWhiteSpace(this.apiKey))" OnClick="@this.StoreAPIKeyAsync">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" StartIcon="@AppIcons.SAVE" Disabled="@(!this.CanStoreAPIKey)" OnClick="@this.StoreAPIKeyAsync">
|
||||
@T("Check and save API key")
|
||||
</MudButton>
|
||||
@if (this.isBusy)
|
||||
|
||||
Reference in new issue
Block a user