mirror of
https://github.com/Eugeny/tabby.git
synced 2025-01-01 15:11:16 +03:00
error handling
This commit is contained in:
parent
396d8d6122
commit
552991271f
@ -64,14 +64,6 @@ export class EditConnectionModalComponent {
|
||||
)
|
||||
|
||||
async ngOnInit () {
|
||||
this.hasSavedPassword = !!await this.passwordStorage.loadPassword(this.connection)
|
||||
this.connection.algorithms = this.connection.algorithms ?? {}
|
||||
this.connection.scripts = this.connection.scripts ?? []
|
||||
this.connection.auth = this.connection.auth ?? null
|
||||
this.connection.privateKeys ??= []
|
||||
|
||||
this.useProxyCommand = !!this.connection.proxyCommand
|
||||
|
||||
for (const k of Object.values(SSHAlgorithmType)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||
if (!this.connection.algorithms[k]) {
|
||||
@ -83,6 +75,18 @@ export class EditConnectionModalComponent {
|
||||
this.algorithms[k][alg] = true
|
||||
}
|
||||
}
|
||||
|
||||
this.connection.algorithms = this.connection.algorithms ?? {}
|
||||
this.connection.scripts = this.connection.scripts ?? []
|
||||
this.connection.auth = this.connection.auth ?? null
|
||||
this.connection.privateKeys ??= []
|
||||
|
||||
this.useProxyCommand = !!this.connection.proxyCommand
|
||||
try {
|
||||
this.hasSavedPassword = !!await this.passwordStorage.loadPassword(this.connection)
|
||||
} catch (e) {
|
||||
console.error('Could not check for saved password', e)
|
||||
}
|
||||
}
|
||||
|
||||
async setPassword () {
|
||||
|
Loading…
Reference in New Issue
Block a user