mirror of
https://github.com/eugeny/tabby
synced 2025-12-12 18:55:47 +00:00
lint
This commit is contained in:
@@ -25,14 +25,14 @@ export class SSHSettingsTabComponent {
|
||||
}
|
||||
|
||||
createConnection () {
|
||||
let connection: SSHConnection = {
|
||||
const connection: SSHConnection = {
|
||||
name: '',
|
||||
host: '',
|
||||
port: 22,
|
||||
user: 'root',
|
||||
}
|
||||
|
||||
let modal = this.ngbModal.open(EditConnectionModalComponent)
|
||||
const modal = this.ngbModal.open(EditConnectionModalComponent)
|
||||
modal.componentInstance.connection = connection
|
||||
modal.result.then(result => {
|
||||
this.connections.push(result)
|
||||
@@ -43,7 +43,7 @@ export class SSHSettingsTabComponent {
|
||||
}
|
||||
|
||||
editConnection (connection: SSHConnection) {
|
||||
let modal = this.ngbModal.open(EditConnectionModalComponent)
|
||||
const modal = this.ngbModal.open(EditConnectionModalComponent)
|
||||
modal.componentInstance.connection = Object.assign({}, connection)
|
||||
modal.result.then(result => {
|
||||
Object.assign(connection, result)
|
||||
@@ -71,12 +71,12 @@ export class SSHSettingsTabComponent {
|
||||
}
|
||||
|
||||
editGroup (group: ISSHConnectionGroup) {
|
||||
let modal = this.ngbModal.open(PromptModalComponent)
|
||||
const modal = this.ngbModal.open(PromptModalComponent)
|
||||
modal.componentInstance.prompt = 'New group name'
|
||||
modal.componentInstance.value = group.name
|
||||
modal.result.then(result => {
|
||||
if (result) {
|
||||
for (let connection of this.connections.filter(x => x.group === group.name)) {
|
||||
for (const connection of this.connections.filter(x => x.group === group.name)) {
|
||||
connection.group = result
|
||||
}
|
||||
this.config.store.ssh.connections = this.connections
|
||||
@@ -96,7 +96,7 @@ export class SSHSettingsTabComponent {
|
||||
defaultId: 1,
|
||||
}
|
||||
)).response === 1) {
|
||||
for (let connection of this.connections.filter(x => x.group === group.name)) {
|
||||
for (const connection of this.connections.filter(x => x.group === group.name)) {
|
||||
connection.group = null
|
||||
}
|
||||
this.config.save()
|
||||
@@ -108,7 +108,7 @@ export class SSHSettingsTabComponent {
|
||||
this.connections = this.config.store.ssh.connections
|
||||
this.childGroups = []
|
||||
|
||||
for (let connection of this.connections) {
|
||||
for (const connection of this.connections) {
|
||||
connection.group = connection.group || null
|
||||
let group = this.childGroups.find(x => x.name === connection.group)
|
||||
if (!group) {
|
||||
|
||||
Reference in New Issue
Block a user