Skip to content

Commit

Permalink
feat(settings): #8680 configurable priotity on quick connect profile …
Browse files Browse the repository at this point in the history
…selector option
  • Loading branch information
Clem-Fern committed Jul 18, 2023
1 parent aba773b commit d36b2b2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions tabby-core/src/configDefaults.yaml
Expand Up @@ -54,3 +54,4 @@ hacks:
disableVibrancyWhileDragging: false
enableFluentBackground: false
language: null
defaultQuickConnectProvider: "ssh"
1 change: 1 addition & 0 deletions tabby-core/src/services/profiles.service.ts
Expand Up @@ -183,6 +183,7 @@ export class ProfilesService {
freeInputPattern: this.translate.instant('Connect to "%s"...'),
description: `(${provider.name.toUpperCase()})`,
icon: 'fas fa-arrow-right',
weight: provider.id !== this.config.store.defaultQuickConnectProvider ? 1 : 0,
callback: query => {
const profile = provider.quickConnect(query)
resolve(profile)
Expand Down
14 changes: 14 additions & 0 deletions tabby-settings/src/components/profilesSettingsTab.component.pug
Expand Up @@ -149,6 +149,20 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
option(ngValue='wt', translation) Windows Terminal
option(ngValue='cygwin', translation) Cygwin

.form-line
.header
.title(translate) Default "Connect to" type
.description(translate) Default connection type used by quick connect feature (ex. SSH, Telnet)

select.form-control(
[(ngModel)]='config.store.defaultQuickConnectProvider',
(ngModelChange)='config.save()',
)
option(
*ngFor='let provider of getQuickConnectProviders()',
[ngValue]='provider.id'
) {{provider.name}}

.form-line.content-box
.header
.title(translate) Default profile settings
Expand Down
Expand Up @@ -312,4 +312,8 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
isProfileBlacklisted (profile: PartialProfile<Profile>): boolean {
return profile.id && this.config.store.profileBlacklist.includes(profile.id)
}

getQuickConnectProviders (): ProfileProvider<Profile>[] {
return this.profileProviders.filter(x => x.supportsQuickConnect)
}
}

0 comments on commit d36b2b2

Please sign in to comment.