handle cancelled username modal

This commit is contained in:
Eugene Pankov 2021-10-19 22:38:53 +02:00
parent 3621ea934c
commit 2fc457dd78
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -250,8 +250,12 @@ export class SSHSession extends BaseSession {
if (!this.authUsername) {
const modal = this.ngbModal.open(PromptModalComponent)
modal.componentInstance.prompt = `Username for ${this.profile.options.host}`
try {
const result = await modal.result
this.authUsername = result?.value ?? null
} catch {
this.authUsername = 'root'
}
}
ssh.connect({