Skip to content

Commit

Permalink
feat(core): Eugeny#8680 push all quick-connect provider into profile …
Browse files Browse the repository at this point in the history
…selector
  • Loading branch information
Clem-Fern committed Jul 15, 2023
1 parent fcac52a commit 3857beb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions tabby-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export default class AppModule { // eslint-disable-line @typescript-eslint/no-ex
name: this.translate.instant('Quick connect'),
freeInputPattern: this.translate.instant('Connect to "%s"...'),
icon: 'fas fa-arrow-right',
description: `(${provider.name.toUpperCase()})`,
callback: query => {
const p = provider.quickConnect(query)
if (p) {
Expand Down
8 changes: 5 additions & 3 deletions tabby-core/src/services/profiles.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,19 @@ export class ProfilesService {
})
} catch { }

if (this.getProviders().some(x => x.supportsQuickConnect)) {
this.getProviders().filter(x => x.supportsQuickConnect).forEach(provider => {
options.push({
name: this.translate.instant('Quick connect'),
freeInputPattern: this.translate.instant('Connect to "%s"...'),
description: `(${provider.name.toUpperCase()})`,
icon: 'fas fa-arrow-right',
callback: query => {
const profile = this.quickConnect(query)
const profile = provider.quickConnect(query)
resolve(profile)
},
})
}
})

await this.selector.show(this.translate.instant('Select profile or enter an address'), options)
} catch (err) {
reject(err)
Expand Down

0 comments on commit 3857beb

Please sign in to comment.