mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-24 09:06:03 +00:00
Merge pull request #3072 from zend/master
This commit is contained in:
@@ -20,6 +20,8 @@ h3 Connections
|
|||||||
.mr-auto
|
.mr-auto
|
||||||
div {{connection.name}}
|
div {{connection.name}}
|
||||||
.text-muted {{connection.host}}
|
.text-muted {{connection.host}}
|
||||||
|
button.btn.btn-outline-info.ml-1((click)='$event.stopPropagation(); copyConnection(connection)')
|
||||||
|
i.fas.fa-copy
|
||||||
button.btn.btn-outline-danger.ml-1((click)='$event.stopPropagation(); deleteConnection(connection)')
|
button.btn.btn-outline-danger.ml-1((click)='$event.stopPropagation(); deleteConnection(connection)')
|
||||||
i.fas.fa-trash
|
i.fas.fa-trash
|
||||||
|
|
||||||
|
@@ -46,6 +46,19 @@ export class SSHSettingsTabComponent {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
copyConnection (connection: SSHConnection) {
|
||||||
|
const modal = this.ngbModal.open(EditConnectionModalComponent)
|
||||||
|
modal.componentInstance.connection = Object.assign({
|
||||||
|
name: `${name} Copy`,
|
||||||
|
}, connection)
|
||||||
|
modal.result.then(result => {
|
||||||
|
this.connections.push(result)
|
||||||
|
this.config.store.ssh.connections = this.connections
|
||||||
|
this.config.save()
|
||||||
|
this.refresh()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
editConnection (connection: SSHConnection) {
|
editConnection (connection: SSHConnection) {
|
||||||
const modal = this.ngbModal.open(EditConnectionModalComponent, { size: 'lg' })
|
const modal = this.ngbModal.open(EditConnectionModalComponent, { size: 'lg' })
|
||||||
modal.componentInstance.connection = Object.assign({}, connection)
|
modal.componentInstance.connection = Object.assign({}, connection)
|
||||||
|
Reference in New Issue
Block a user