diff --git a/tabby-core/src/api/selector.ts b/tabby-core/src/api/selector.ts index 3118dfeaa034c80ec748c100f04ffdc0790e4597..c84377217852f4cd90031331579f418050812df5 100644 --- a/tabby-core/src/api/selector.ts +++ b/tabby-core/src/api/selector.ts @@ -4,5 +4,6 @@ export interface SelectorOption { result?: T icon?: string freeInputPattern?: string + color?: string callback?: (string?) => void } diff --git a/tabby-core/src/components/selectorModal.component.pug b/tabby-core/src/components/selectorModal.component.pug index ea1a1c9201acce6840402bb46ef3ddad829a88fc..9c0064f909c4840bda9d6f200a2107774dc8d125 100644 --- a/tabby-core/src/components/selectorModal.component.pug +++ b/tabby-core/src/components/selectorModal.component.pug @@ -7,7 +7,7 @@ (ngModelChange)='onFilterChange()' ) - .list-group(*ngIf='filteredOptions.length') + div(*ngIf='filteredOptions.length') a.list-group-item.list-group-item-action.d-flex.align-items-center( #item, (click)='selectOption(option)', @@ -16,10 +16,12 @@ ) i.icon( class='fa-fw {{option.icon}}', + style='color: {{option.color}}', *ngIf='!iconIsSVG(option.icon)' ) .icon( [fastHtmlBind]='option.icon', + style='color: {{option.color}}', *ngIf='iconIsSVG(option.icon)' ) .title.mr-2 {{getOptionText(option)}} diff --git a/tabby-core/src/services/profiles.service.ts b/tabby-core/src/services/profiles.service.ts index f06ee33e37ae85d080143a579b0145bc1ff37da6..7d2ada78ef4516a30e5870be3810140177fdd78f 100644 --- a/tabby-core/src/services/profiles.service.ts +++ b/tabby-core/src/services/profiles.service.ts @@ -84,8 +84,9 @@ export class ProfilesService { selectorOptionForProfile

(profile: PartialProfile

): SelectorOption { const fullProfile = this.getConfigProxyForProfile(profile) return { - icon: profile.icon, name: profile.group ? `${fullProfile.group} / ${fullProfile.name}` : fullProfile.name, + icon: profile.icon, + color: profile.color, description: this.providerForProfile(fullProfile)?.getDescription(fullProfile), } } @@ -99,6 +100,7 @@ export class ProfilesService { let options: SelectorOption[] = recentProfiles.map(p => ({ ...this.selectorOptionForProfile(p), icon: 'fas fa-history', + color: p.color, callback: async () => { if (p.id) { p = (await this.getProfiles()).find(x => x.id === p.id) ?? p diff --git a/tabby-core/src/theme.scss b/tabby-core/src/theme.scss index 963286081ba4f05595929e19eb379b64fa6f9e23..a7630e2983d5e2c4d2eb523da8c1adf13a7d7744 100644 --- a/tabby-core/src/theme.scss +++ b/tabby-core/src/theme.scss @@ -230,7 +230,7 @@ hotkey-input-modal { } } -.list-group.list-group-flush .list-group-item:not(.list-group-item-action) { +.list-group.list-group-flush { background: transparent; border-color: rgba(0, 0, 0, 0.2); diff --git a/tabby-core/src/theme.vars.scss b/tabby-core/src/theme.vars.scss index 32ba0149de975607547f23582d0566f60510e609..4d7cb7aebc819817a19badac13cd7bb9001967d5 100644 --- a/tabby-core/src/theme.vars.scss +++ b/tabby-core/src/theme.vars.scss @@ -88,7 +88,7 @@ $list-group-item-padding-y: 0.8rem; $list-group-item-padding-x: 1rem; $list-group-hover-bg: $table-bg-hover; -$list-group-active-bg: rgba(255,255,255,.2); +$list-group-active-bg: rgba(255,255,255,.05); $list-group-active-color: $component-active-color; $list-group-active-border-color: translate;