mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-15 11:41:37 +00:00
Fixed API key pasting & it's validation
This commit is contained in:
parent
48edfe32c0
commit
728fc8449b
@ -241,10 +241,14 @@ public partial class EmbeddingProviderDialog : MSGComponentBase, ISecretId
|
|||||||
|
|
||||||
private void Cancel() => this.MudDialog.Cancel();
|
private void Cancel() => this.MudDialog.Cancel();
|
||||||
|
|
||||||
private void OnAPIKeyChanged(string apiKey)
|
private async Task OnAPIKeyChanged(string apiKey)
|
||||||
{
|
{
|
||||||
this.dataAPIKey = apiKey;
|
this.dataAPIKey = apiKey;
|
||||||
|
if (!string.IsNullOrWhiteSpace(this.dataAPIKeyStorageIssue))
|
||||||
|
{
|
||||||
this.dataAPIKeyStorageIssue = string.Empty;
|
this.dataAPIKeyStorageIssue = string.Empty;
|
||||||
|
await this.form.Validate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ReloadModels()
|
private async Task ReloadModels()
|
||||||
|
|||||||
@ -255,10 +255,14 @@ public partial class ProviderDialog : MSGComponentBase, ISecretId
|
|||||||
|
|
||||||
private void Cancel() => this.MudDialog.Cancel();
|
private void Cancel() => this.MudDialog.Cancel();
|
||||||
|
|
||||||
private void OnAPIKeyChanged(string apiKey)
|
private async Task OnAPIKeyChanged(string apiKey)
|
||||||
{
|
{
|
||||||
this.dataAPIKey = apiKey;
|
this.dataAPIKey = apiKey;
|
||||||
|
if (!string.IsNullOrWhiteSpace(this.dataAPIKeyStorageIssue))
|
||||||
|
{
|
||||||
this.dataAPIKeyStorageIssue = string.Empty;
|
this.dataAPIKeyStorageIssue = string.Empty;
|
||||||
|
await this.form.Validate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ReloadModels()
|
private async Task ReloadModels()
|
||||||
|
|||||||
@ -249,10 +249,14 @@ public partial class TranscriptionProviderDialog : MSGComponentBase, ISecretId
|
|||||||
|
|
||||||
private void Cancel() => this.MudDialog.Cancel();
|
private void Cancel() => this.MudDialog.Cancel();
|
||||||
|
|
||||||
private void OnAPIKeyChanged(string apiKey)
|
private async Task OnAPIKeyChanged(string apiKey)
|
||||||
{
|
{
|
||||||
this.dataAPIKey = apiKey;
|
this.dataAPIKey = apiKey;
|
||||||
|
if (!string.IsNullOrWhiteSpace(this.dataAPIKeyStorageIssue))
|
||||||
|
{
|
||||||
this.dataAPIKeyStorageIssue = string.Empty;
|
this.dataAPIKeyStorageIssue = string.Empty;
|
||||||
|
await this.form.Validate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ReloadModels()
|
private async Task ReloadModels()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user