Improved cancel UX

This commit is contained in:
Thorsten Sommer 2026-06-05 13:49:47 +02:00
parent 22c897a3a8
commit 3918d7d674
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -120,7 +120,20 @@ public partial class WorkspaceSelectionDialog : MSGComponentBase
}
}
private void Cancel() => this.MudDialog.Cancel();
private void Cancel()
{
if (!this.showCreateWorkspaceForm)
{
this.MudDialog.Cancel();
return;
}
this.createWorkspaceError = null;
this.createWorkspaceErrorName = null;
this.newWorkspaceName = string.Empty;
this.createWorkspaceForm.ResetValidation();
this.showCreateWorkspaceForm = false;
}
private void Confirm() => this.MudDialog.Close(DialogResult.Ok(this.selectedWorkspace));
}