mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 10:07:22 +00:00
Upgraded to MudBlazor 9 (#1137)
This commit is contained in:
1 parent
e0337a99bc
commit
aeba1fbccc
625 files changed
+408
-882
No files matched your search
@@ -120,7 +120,7 @@ public partial class WorkspaceSelectionDialog : MSGComponentBase
|
||||
|
||||
this.createWorkspaceError = null;
|
||||
this.createWorkspaceErrorName = null;
|
||||
await this.createWorkspaceForm.Validate();
|
||||
await this.createWorkspaceForm.ValidateAsync();
|
||||
if (!this.createWorkspaceForm.IsValid)
|
||||
return;
|
||||
|
||||
@@ -132,14 +132,16 @@ public partial class WorkspaceSelectionDialog : MSGComponentBase
|
||||
{
|
||||
this.createWorkspaceError = T("There is already a workspace with this name. Please choose a different name.");
|
||||
this.createWorkspaceErrorName = WorkspaceBehaviour.NormalizeWorkspaceName(this.newWorkspaceName);
|
||||
await this.createWorkspaceForm.Validate();
|
||||
await this.createWorkspaceForm.ValidateAsync();
|
||||
return;
|
||||
}
|
||||
|
||||
this.workspaces.Add(new(result.Workspace.WorkspaceId, result.Workspace.Name));
|
||||
this.selectedWorkspace = result.Workspace.WorkspaceId;
|
||||
this.newWorkspaceName = string.Empty;
|
||||
this.createWorkspaceForm?.ResetValidation();
|
||||
if (this.createWorkspaceForm is not null)
|
||||
await this.createWorkspaceForm.ResetValidationAsync();
|
||||
|
||||
this.showCreateWorkspaceForm = false;
|
||||
await this.SendMessage(Event.WORKSPACE_CREATED, result.Workspace.WorkspaceId);
|
||||
}
|
||||
@@ -149,7 +151,7 @@ public partial class WorkspaceSelectionDialog : MSGComponentBase
|
||||
}
|
||||
}
|
||||
|
||||
private void Cancel()
|
||||
private async Task CancelAsync()
|
||||
{
|
||||
if (!this.showCreateWorkspaceForm)
|
||||
{
|
||||
@@ -160,7 +162,9 @@ public partial class WorkspaceSelectionDialog : MSGComponentBase
|
||||
this.createWorkspaceError = null;
|
||||
this.createWorkspaceErrorName = null;
|
||||
this.newWorkspaceName = string.Empty;
|
||||
this.createWorkspaceForm?.ResetValidation();
|
||||
if (this.createWorkspaceForm is not null)
|
||||
await this.createWorkspaceForm.ResetValidationAsync();
|
||||
|
||||
this.showCreateWorkspaceForm = false;
|
||||
this.shouldFocusNewWorkspaceName = false;
|
||||
}
|
||||
@@ -168,9 +172,9 @@ public partial class WorkspaceSelectionDialog : MSGComponentBase
|
||||
[JSInvokable]
|
||||
public async Task HandleEscapeKeyAsync()
|
||||
{
|
||||
await this.InvokeAsync(() =>
|
||||
await this.InvokeAsync(async () =>
|
||||
{
|
||||
this.Cancel();
|
||||
await this.CancelAsync();
|
||||
this.StateHasChanged();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user