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