mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
ref(core/settings/serial/ssh/telnet): create ConnectableProfile & ConnectableProfileProvider Eugeny/tabby#8416
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { BaseTerminalProfile, InputProcessingOptions, LoginScriptsOptions } from 'tabby-terminal'
|
||||
import { ConnectableTerminalProfile, InputProcessingOptions, LoginScriptsOptions } from 'tabby-terminal'
|
||||
|
||||
export enum SSHAlgorithmType {
|
||||
HMAC = 'hmac',
|
||||
@@ -7,7 +7,7 @@ export enum SSHAlgorithmType {
|
||||
HOSTKEY = 'serverHostKey',
|
||||
}
|
||||
|
||||
export interface SSHProfile extends BaseTerminalProfile {
|
||||
export interface SSHProfile extends ConnectableTerminalProfile {
|
||||
options: SSHProfileOptions
|
||||
}
|
||||
|
||||
|
@@ -83,7 +83,7 @@ export class SSHTabComponent extends ConnectableTerminalTabComponent<SSHProfile>
|
||||
|
||||
const jumpSession = await this.setupOneSession(
|
||||
this.injector,
|
||||
this.profilesService.getConfigProxyForProfile(jumpConnection),
|
||||
this.profilesService.getConfigProxyForProfile<SSHProfile>(jumpConnection),
|
||||
)
|
||||
|
||||
jumpSession.ref()
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Injectable, InjectFlags, Injector } from '@angular/core'
|
||||
import { ProfileProvider, NewTabParameters, PartialProfile, TranslateService } from 'tabby-core'
|
||||
import { NewTabParameters, PartialProfile, TranslateService, ConnectableProfileProvider } from 'tabby-core'
|
||||
import * as ALGORITHMS from 'ssh2/lib/protocol/constants'
|
||||
import { SSHProfileSettingsComponent } from './components/sshProfileSettings.component'
|
||||
import { SSHTabComponent } from './components/sshTab.component'
|
||||
@@ -8,10 +8,9 @@ import { ALGORITHM_BLACKLIST, SSHAlgorithmType, SSHProfile } from './api'
|
||||
import { SSHProfileImporter } from './api/importer'
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class SSHProfilesService extends ProfileProvider<SSHProfile> {
|
||||
export class SSHProfilesService extends ConnectableProfileProvider<SSHProfile> {
|
||||
id = 'ssh'
|
||||
name = 'SSH'
|
||||
supportsQuickConnect = true
|
||||
settingsComponent = SSHProfileSettingsComponent
|
||||
configDefaults = {
|
||||
options: {
|
||||
|
@@ -34,7 +34,7 @@ export class SSHMultiplexerService {
|
||||
if (!jumpConnection) {
|
||||
return key
|
||||
}
|
||||
const jumpProfile = this.profilesService.getConfigProxyForProfile(jumpConnection)
|
||||
const jumpProfile = this.profilesService.getConfigProxyForProfile<SSHProfile>(jumpConnection)
|
||||
key += '$' + await this.getMultiplexerKey(jumpProfile)
|
||||
}
|
||||
return key
|
||||
|
Reference in New Issue
Block a user