Skip to content

Commit c99fc69

Browse files
committed
update notification for commit graph
1 parent eba2fb2 commit c99fc69

File tree

2 files changed

+35
-20
lines changed

2 files changed

+35
-20
lines changed

src/plus/gk/account/subscriptionService.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -708,19 +708,14 @@ export class SubscriptionService implements Disposable {
708708
this.changeSubscription(subscription);
709709

710710
setTimeout(async () => {
711-
const confirm: MessageItem = { title: 'Continue' };
712-
const learn: MessageItem = { title: 'See Pro Features' };
713-
const result = await window.showInformationMessage(
714-
`You can now preview local Pro features for ${
711+
await window.showInformationMessage(
712+
`You can now preview the Commit Graph on privately-hosted repos for ${
715713
days < 1 ? '1 day' : pluralize('day', days)
716-
}, or [start your free ${proTrialLengthInDays}-day Pro trial](command:gitlens.plus.signUp "Start Pro Trial") for full access to Pro features.`,
717-
confirm,
718-
learn,
714+
}, or [start your free ${proTrialLengthInDays}-day Pro trial](command:gitlens.plus.signUp "Start Pro Trial") for full access to all [GitLens Pro](${
715+
urls.gitlensProVsCommunity
716+
}) features.`,
717+
{ title: 'Continue' },
719718
);
720-
721-
if (result === learn) {
722-
void this.learnAboutPro({ source: 'notification', detail: { action: 'preview-started' } }, source);
723-
}
724719
}, 1);
725720
}
726721

src/webviews/apps/plus/shared/components/feature-gate-plus-state.ts

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,34 @@ export class GlFeatureGatePlusState extends LitElement {
122122

123123
case SubscriptionState.Community:
124124
case SubscriptionState.ProPreviewExpired:
125-
return html`
126-
${feature !== 'graph'
127-
? html`<p>
128-
Use on privately-hosted repos requires
129-
<a href="${urls.gitlensProVsCommunity}">GitLens Pro</a>.
130-
</p>`
131-
: nothing}
125+
if (feature === 'graph' && this.state === SubscriptionState.Community) {
126+
return html`
127+
<gl-button
128+
appearance="${appearance}"
129+
href="${generateCommandLink(Commands.PlusStartPreviewTrial, this.source)}"
130+
>Continue</gl-button
131+
>
132+
<p>
133+
Continuing gives you 3 days to preview
134+
${this.featureWithArticleIfNeeded
135+
? `${this.featureWithArticleIfNeeded} and other `
136+
: ''}local
137+
Pro features.<br />
138+
${appearance !== 'alert' ? html`<br />` : ''} For full access to Pro features
139+
<a href="${generateCommandLink(Commands.PlusSignUp, this.source)}"
140+
>start your free ${proTrialLengthInDays}-day Pro trial</a
141+
>
142+
or
143+
<a href="${generateCommandLink(Commands.PlusLogin, this.source)}" title="Sign In">sign in</a
144+
>.
145+
</p>
146+
`;
147+
}
148+
149+
return html`<p>
150+
Use on privately-hosted repos requires
151+
<a href="${urls.gitlensProVsCommunity}">GitLens Pro</a>.
152+
</p>
132153
<gl-button
133154
appearance="${appearance}"
134155
href="${generateCommandLink(Commands.PlusSignUp, this.source)}"
@@ -137,8 +158,7 @@ export class GlFeatureGatePlusState extends LitElement {
137158
<p>
138159
Get ${proTrialLengthInDays} days of GitLens Pro for free - no credit card required. Or
139160
<a href="${generateCommandLink(Commands.PlusLogin, this.source)}" title="Sign In">sign in</a>.
140-
</p>
141-
`;
161+
</p> `;
142162

143163
case SubscriptionState.ProTrialExpired:
144164
return html`<p>

0 commit comments

Comments
 (0)