mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-19 19:09:54 +00:00
delete saved password when deleting and ssh connection (fixes #1999)
This commit is contained in:
parent
3f8b933d05
commit
fd1ea4fc49
@ -1,6 +1,7 @@
|
|||||||
import { Component } from '@angular/core'
|
import { Component } from '@angular/core'
|
||||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
||||||
import { ConfigService, ElectronService, HostAppService } from 'terminus-core'
|
import { ConfigService, ElectronService, HostAppService } from 'terminus-core'
|
||||||
|
import { PasswordStorageService } from '../services/passwordStorage.service'
|
||||||
import { SSHConnection, SSHConnectionGroup } from '../api'
|
import { SSHConnection, SSHConnectionGroup } from '../api'
|
||||||
import { EditConnectionModalComponent } from './editConnectionModal.component'
|
import { EditConnectionModalComponent } from './editConnectionModal.component'
|
||||||
import { PromptModalComponent } from './promptModal.component'
|
import { PromptModalComponent } from './promptModal.component'
|
||||||
@ -19,6 +20,7 @@ export class SSHSettingsTabComponent {
|
|||||||
private electron: ElectronService,
|
private electron: ElectronService,
|
||||||
private hostApp: HostAppService,
|
private hostApp: HostAppService,
|
||||||
private ngbModal: NgbModal,
|
private ngbModal: NgbModal,
|
||||||
|
private passwordStorage: PasswordStorageService,
|
||||||
) {
|
) {
|
||||||
this.connections = this.config.store.ssh.connections
|
this.connections = this.config.store.ssh.connections
|
||||||
this.refresh()
|
this.refresh()
|
||||||
@ -65,6 +67,7 @@ export class SSHSettingsTabComponent {
|
|||||||
}
|
}
|
||||||
)).response === 1) {
|
)).response === 1) {
|
||||||
this.connections = this.connections.filter(x => x !== connection)
|
this.connections = this.connections.filter(x => x !== connection)
|
||||||
|
this.passwordStorage.deletePassword(connection)
|
||||||
this.config.store.ssh.connections = this.connections
|
this.config.store.ssh.connections = this.connections
|
||||||
this.config.save()
|
this.config.save()
|
||||||
this.refresh()
|
this.refresh()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user