mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +00:00
fixed #1785
This commit is contained in:
parent
bb9c80623d
commit
03fc68bb6d
@ -21,7 +21,7 @@ export interface SSHConnection {
|
|||||||
user: string
|
user: string
|
||||||
password?: string
|
password?: string
|
||||||
privateKey?: string
|
privateKey?: string
|
||||||
group?: string
|
group: string | null
|
||||||
scripts?: LoginScript[]
|
scripts?: LoginScript[]
|
||||||
keepaliveInterval?: number
|
keepaliveInterval?: number
|
||||||
keepaliveCountMax?: number
|
keepaliveCountMax?: number
|
||||||
|
@ -49,6 +49,7 @@ export class SSHModalComponent {
|
|||||||
|
|
||||||
const connection: SSHConnection = {
|
const connection: SSHConnection = {
|
||||||
name: this.quickTarget,
|
name: this.quickTarget,
|
||||||
|
group: null,
|
||||||
host,
|
host,
|
||||||
user,
|
user,
|
||||||
port,
|
port,
|
||||||
@ -91,7 +92,7 @@ export class SSHModalComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const connection of connections) {
|
for (const connection of connections) {
|
||||||
connection.group = connection.group || undefined
|
connection.group = connection.group || null
|
||||||
let group = this.childGroups.find(x => x.name === connection.group)
|
let group = this.childGroups.find(x => x.name === connection.group)
|
||||||
if (!group) {
|
if (!group) {
|
||||||
group = {
|
group = {
|
||||||
|
@ -27,6 +27,7 @@ export class SSHSettingsTabComponent {
|
|||||||
createConnection () {
|
createConnection () {
|
||||||
const connection: SSHConnection = {
|
const connection: SSHConnection = {
|
||||||
name: '',
|
name: '',
|
||||||
|
group: null,
|
||||||
host: '',
|
host: '',
|
||||||
port: 22,
|
port: 22,
|
||||||
user: 'root',
|
user: 'root',
|
||||||
@ -97,7 +98,7 @@ export class SSHSettingsTabComponent {
|
|||||||
}
|
}
|
||||||
)).response === 1) {
|
)).response === 1) {
|
||||||
for (const connection of this.connections.filter(x => x.group === group.name)) {
|
for (const connection of this.connections.filter(x => x.group === group.name)) {
|
||||||
connection.group = undefined
|
connection.group = null
|
||||||
}
|
}
|
||||||
this.config.save()
|
this.config.save()
|
||||||
this.refresh()
|
this.refresh()
|
||||||
@ -109,7 +110,7 @@ export class SSHSettingsTabComponent {
|
|||||||
this.childGroups = []
|
this.childGroups = []
|
||||||
|
|
||||||
for (const connection of this.connections) {
|
for (const connection of this.connections) {
|
||||||
connection.group = connection.group || undefined
|
connection.group = connection.group || null
|
||||||
let group = this.childGroups.find(x => x.name === connection.group)
|
let group = this.childGroups.find(x => x.name === connection.group)
|
||||||
if (!group) {
|
if (!group) {
|
||||||
group = {
|
group = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user