mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-30 08:19:54 +00:00
Using Object.assign to copy connection
This commit is contained in:
parent
1c25747de0
commit
4ccc406768
@ -47,9 +47,8 @@ export class SSHSettingsTabComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
copyConnection (connection) {
|
copyConnection (connection) {
|
||||||
connection.name += ' Copy'
|
|
||||||
const modal = this.ngbModal.open(EditConnectionModalComponent)
|
const modal = this.ngbModal.open(EditConnectionModalComponent)
|
||||||
modal.componentInstance.connection = connection
|
modal.componentInstance.connection = Object.assign({name: name + ' Copy'}, connection)
|
||||||
modal.result.then(result => {
|
modal.result.then(result => {
|
||||||
this.connections.push(result)
|
this.connections.push(result)
|
||||||
this.config.store.ssh.connections = this.connections
|
this.config.store.ssh.connections = this.connections
|
||||||
|
Loading…
x
Reference in New Issue
Block a user