From 3857beb46bdd1769f7535ef8c99df3521faa762a Mon Sep 17 00:00:00 2001 From: Clem Fern Date: Sat, 15 Jul 2023 21:10:16 +0200 Subject: [PATCH] feat(core): Eugeny/tabby#8680 push all quick-connect provider into profile selector --- tabby-core/src/index.ts | 1 + tabby-core/src/services/profiles.service.ts | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tabby-core/src/index.ts b/tabby-core/src/index.ts index 56229857..6cf14a24 100644 --- a/tabby-core/src/index.ts +++ b/tabby-core/src/index.ts @@ -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) { diff --git a/tabby-core/src/services/profiles.service.ts b/tabby-core/src/services/profiles.service.ts index 295909e7..e1892d2f 100644 --- a/tabby-core/src/services/profiles.service.ts +++ b/tabby-core/src/services/profiles.service.ts @@ -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)