mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 05:20:01 +00:00
handle cancelled username modal
This commit is contained in:
parent
3621ea934c
commit
2fc457dd78
@ -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}`
|
||||
const result = await modal.result
|
||||
this.authUsername = result?.value ?? null
|
||||
try {
|
||||
const result = await modal.result
|
||||
this.authUsername = result?.value ?? null
|
||||
} catch {
|
||||
this.authUsername = 'root'
|
||||
}
|
||||
}
|
||||
|
||||
ssh.connect({
|
||||
|
Loading…
x
Reference in New Issue
Block a user