From c043d5bc837596e9c6e972eaa65074869884c769 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Tue, 13 Jul 2021 10:28:27 +0200 Subject: [PATCH] delegate getDescription to ProfilesService --- tabby-core/src/services/profiles.service.ts | 5 +++++ .../src/components/profilesSettingsTab.component.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tabby-core/src/services/profiles.service.ts b/tabby-core/src/services/profiles.service.ts index a1d99c21..d23b7fa8 100644 --- a/tabby-core/src/services/profiles.service.ts +++ b/tabby-core/src/services/profiles.service.ts @@ -73,6 +73,11 @@ export class ProfilesService { return this.profileProviders.find(x => x.id === profile.type) ?? null } + getDescription (profile: Profile): string|null { + profile = this.getConfigProxyForProfile(profile) + return this.providerForProfile(profile)?.getDescription(profile) ?? null + } + selectorOptionForProfile (profile: Profile): SelectorOption { profile = this.getConfigProxyForProfile(profile) return { diff --git a/tabby-settings/src/components/profilesSettingsTab.component.ts b/tabby-settings/src/components/profilesSettingsTab.component.ts index b4f643db..e6ef6979 100644 --- a/tabby-settings/src/components/profilesSettingsTab.component.ts +++ b/tabby-settings/src/components/profilesSettingsTab.component.ts @@ -190,7 +190,7 @@ export class ProfilesSettingsTabComponent extends BaseComponent { } getDescription (profile: Profile): string|null { - return this.profilesService.providerForProfile(profile)?.getDescription(profile) ?? null + return this.profilesService.getDescription(profile) } getTypeLabel (profile: Profile): string { -- GitLab