mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +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) {
|
if (!this.authUsername) {
|
||||||
const modal = this.ngbModal.open(PromptModalComponent)
|
const modal = this.ngbModal.open(PromptModalComponent)
|
||||||
modal.componentInstance.prompt = `Username for ${this.profile.options.host}`
|
modal.componentInstance.prompt = `Username for ${this.profile.options.host}`
|
||||||
|
try {
|
||||||
const result = await modal.result
|
const result = await modal.result
|
||||||
this.authUsername = result?.value ?? null
|
this.authUsername = result?.value ?? null
|
||||||
|
} catch {
|
||||||
|
this.authUsername = 'root'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ssh.connect({
|
ssh.connect({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user