mirror of
https://github.com/eugeny/tabby
synced 2025-12-16 04:35:56 +00:00
Merge branch 'master' of github.com:Eugeny/terminus
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user