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:
@@ -74,7 +74,7 @@
|
||||
)
|
||||
option(ngValue='auto', translate) Auto
|
||||
option(ngValue='keep', translate) Keep
|
||||
option(*ngIf='profile.type == "serial" || profile.type == "telnet" || profile.type == "ssh"', ngValue='reconnect', translate) Reconnect
|
||||
option(*ngIf='isConnectable()', ngValue='reconnect', translate) Reconnect
|
||||
option(ngValue='close', translate) Close
|
||||
|
||||
.mb-4
|
||||
|
@@ -2,7 +2,7 @@
|
||||
import { Observable, OperatorFunction, debounceTime, map, distinctUntilChanged } from 'rxjs'
|
||||
import { Component, Input, ViewChild, ViewContainerRef, ComponentFactoryResolver, Injector } from '@angular/core'
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { ConfigProxy, ConfigService, Profile, ProfileProvider, ProfileSettingsComponent, ProfilesService, TAB_COLORS } from 'tabby-core'
|
||||
import { ConfigProxy, ConfigService, Profile, ProfileProvider, ProfileSettingsComponent, ProfilesService, TAB_COLORS, ConnectableProfileProvider } from 'tabby-core'
|
||||
|
||||
const iconsData = require('../../../tabby-core/src/icons.json')
|
||||
const iconsClassList = Object.keys(iconsData).map(
|
||||
@@ -95,4 +95,9 @@ export class EditProfileModalComponent<P extends Profile> {
|
||||
cancel () {
|
||||
this.modalInstance.dismiss()
|
||||
}
|
||||
|
||||
isConnectable (): boolean {
|
||||
return this.profileProvider instanceof ConnectableProfileProvider
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ import slugify from 'slugify'
|
||||
import deepClone from 'clone-deep'
|
||||
import { Component, Inject } from '@angular/core'
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { ConfigService, HostAppService, Profile, SelectorService, ProfilesService, PromptModalComponent, PlatformService, BaseComponent, PartialProfile, ProfileProvider, TranslateService, Platform, AppHotkeyProvider } from 'tabby-core'
|
||||
import { ConfigService, HostAppService, Profile, SelectorService, ProfilesService, PromptModalComponent, PlatformService, BaseComponent, PartialProfile, ProfileProvider, TranslateService, Platform, AppHotkeyProvider, ConnectableProfileProvider } from 'tabby-core'
|
||||
import { EditProfileModalComponent } from './editProfileModal.component'
|
||||
|
||||
interface ProfileGroup {
|
||||
@@ -314,6 +314,6 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
|
||||
}
|
||||
|
||||
getQuickConnectProviders (): ProfileProvider<Profile>[] {
|
||||
return this.profileProviders.filter(x => x.supportsQuickConnect)
|
||||
return this.profileProviders.filter(x => x instanceof ConnectableProfileProvider)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user