1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-25 19:17:39 +03:00

Using Object.assign to copy connection

This commit is contained in:
Zenghai Liang 2020-10-14 16:40:14 +08:00
parent 1c25747de0
commit 4ccc406768
No known key found for this signature in database
GPG Key ID: B389E2148C1B2E0D

View File

@ -47,9 +47,8 @@ export class SSHSettingsTabComponent {
}
copyConnection (connection) {
connection.name += ' Copy'
const modal = this.ngbModal.open(EditConnectionModalComponent)
modal.componentInstance.connection = connection
modal.componentInstance.connection = Object.assign({name: name + ' Copy'}, connection)
modal.result.then(result => {
this.connections.push(result)
this.config.store.ssh.connections = this.connections