@@ -6,6 +6,7 @@ import type {
66 ManageCloudIntegrationsCommandArgs ,
77} from '../../../../../commands/cloudIntegrations' ;
88import type { IntegrationFeatures } from '../../../../../constants.integrations' ;
9+ import { SubscriptionState } from '../../../../../constants.subscription' ;
910import type { Source } from '../../../../../constants.telemetry' ;
1011import {
1112 hasAccountFromSubscriptionState ,
@@ -96,10 +97,16 @@ export class GLIntegrationsChip extends LitElement {
9697 color: var(--color-foreground--25);
9798 }
9899
99- .integration__title {
100+ .integration__content {
101+ flex: 1 1 auto;
100102 display: block;
101103 }
102104
105+ .integration__title {
106+ display: flex;
107+ justify-content: space-between;
108+ }
109+
103110 .integration__title gl-feature-badge {
104111 vertical-align: super;
105112 }
@@ -116,7 +123,7 @@ export class GLIntegrationsChip extends LitElement {
116123 }
117124
118125 .integration__actions {
119- flex: 1 1 auto ;
126+ flex: none ;
120127 display: flex;
121128 gap: 0.2rem;
122129 flex-direction: row;
@@ -146,6 +153,10 @@ export class GLIntegrationsChip extends LitElement {
146153 return hasAccountFromSubscriptionState ( this . _state . subscription ?. state ) ;
147154 }
148155
156+ private get isPaidAccount ( ) {
157+ return this . _state . subscription ?. state === SubscriptionState . Paid ;
158+ }
159+
149160 private get isProAccount ( ) {
150161 return isSubscriptionStatePaidOrTrial ( this . _state . subscription ?. state ) ;
151162 }
@@ -245,17 +256,18 @@ export class GLIntegrationsChip extends LitElement {
245256 }
246257
247258 private renderIntegrationRow ( integration : IntegrationState ) {
248- const shouldLock = integration . requiresPro && ! this . isProAccount ;
259+ const showLock = integration . requiresPro && ! this . isProAccount ;
260+ const showProBadge = integration . requiresPro && ! this . isPaidAccount ;
249261 return html `< div
250- class ="integration-row status-- ${ integration . connected ? 'connected' : 'disconnected' } ${ shouldLock
262+ class ="integration-row status-- ${ integration . connected ? 'connected' : 'disconnected' } ${ showLock
251263 ? ' is-locked'
252264 : '' } "
253265 >
254- < span slot =" anchor "> < code-icon class =" integration__icon " icon ="${ integration . icon } "> </ code-icon > </ span >
255- < span >
266+ < span class =" integration__icon "> < code-icon icon ="${ integration . icon } "> </ code-icon > </ span >
267+ < span class =" integration__content " >
256268 < span class ="integration__title ">
257- ${ integration . name }
258- ${ shouldLock
269+ < span > ${ integration . name } </ span >
270+ ${ showProBadge
259271 ? html ` < gl-feature-badge
260272 placement ="right "
261273 .source =${ { source : 'account' , detail : 'integrations' } }
@@ -266,13 +278,16 @@ export class GLIntegrationsChip extends LitElement {
266278 < span class ="integration__details "> ${ getIntegrationDetails ( integration ) } </ span >
267279 </ span >
268280 < span class ="integration__actions ">
269- ${ shouldLock
270- ? html `< gl-tooltip
271- class ="status-indicator status--disconnected "
272- placement ="bottom "
273- content ="Unlock ${ integration . name } features with GitLens Pro "
281+ ${ showLock
282+ ? html `< gl-button
283+ appearance ="toolbar "
284+ href ="${ createCommandLink < Source > ( 'gitlens.plus.upgrade' , {
285+ source : 'account' ,
286+ } ) } "
287+ tooltip ="Unlock ${ integration . name } features with GitLens Pro "
288+ aria-label ="Unlock ${ integration . name } features with GitLens Pro "
274289 > < code-icon class ="status-indicator " icon ="lock "> </ code-icon
275- > </ gl-tooltip > `
290+ > </ gl-button > `
276291 : integration . connected
277292 ? html `< gl-tooltip
278293 class ="status-indicator status--connected "
0 commit comments