Merge branch 'master' of github.com:Eugeny/terminus

This commit is contained in:
Eugene Pankov
2018-01-19 15:37:51 +01:00
14 changed files with 140 additions and 132 deletions

View File

@@ -33,12 +33,18 @@ export class SSHModalComponent {
quickConnect () {
let user = 'root'
let host = this.quickTarget
let port = 22
if (host.includes('@')) {
[user, host] = host.split('@')
}
if (host.includes(':')) {
port = parseInt(host.split(':')[1])
host = host.split(':')[0]
}
let connection: SSHConnection = {
name: this.quickTarget,
host, user,
host, user, port
}
window.localStorage.lastConnection = JSON.stringify(connection)
this.connect(connection)