This commit is contained in:
Clem
2023-08-18 17:18:06 +02:00
parent a9c63b5305
commit 7687972e65
7 changed files with 26 additions and 20 deletions

View File

@@ -1,11 +1,11 @@
import { Injectable } from '@angular/core'
import { NewTabParameters, PartialProfile, TranslateService, ConnectableProfileProvider } from 'tabby-core'
import { NewTabParameters, PartialProfile, TranslateService, QuickConnectProfileProvider } from 'tabby-core'
import { TelnetProfileSettingsComponent } from './components/telnetProfileSettings.component'
import { TelnetTabComponent } from './components/telnetTab.component'
import { TelnetProfile } from './session'
@Injectable({ providedIn: 'root' })
export class TelnetProfilesService extends ConnectableProfileProvider<TelnetProfile> {
export class TelnetProfilesService extends QuickConnectProfileProvider<TelnetProfile> {
id = 'telnet'
name = 'Telnet'
supportsQuickConnect = true
@@ -96,4 +96,12 @@ export class TelnetProfilesService extends ConnectableProfileProvider<TelnetProf
},
}
}
intoQuickConnectString (profile: TelnetProfile): string | null {
let s = profile.options.host
if (profile.options.port !== 23) {
s = `${s}:${profile.options.port}`
}
return s
}
}