Skip to content

Commit

Permalink
update notification for commit graph
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiolms committed Nov 12, 2024
1 parent eba2fb2 commit c99fc69
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 20 deletions.
17 changes: 6 additions & 11 deletions src/plus/gk/account/subscriptionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,19 +708,14 @@ export class SubscriptionService implements Disposable {
this.changeSubscription(subscription);

setTimeout(async () => {
const confirm: MessageItem = { title: 'Continue' };
const learn: MessageItem = { title: 'See Pro Features' };
const result = await window.showInformationMessage(
`You can now preview local Pro features for ${
await window.showInformationMessage(
`You can now preview the Commit Graph on privately-hosted repos for ${
days < 1 ? '1 day' : pluralize('day', days)
}, or [start your free ${proTrialLengthInDays}-day Pro trial](command:gitlens.plus.signUp "Start Pro Trial") for full access to Pro features.`,
confirm,
learn,
}, or [start your free ${proTrialLengthInDays}-day Pro trial](command:gitlens.plus.signUp "Start Pro Trial") for full access to all [GitLens Pro](${
urls.gitlensProVsCommunity
}) features.`,
{ title: 'Continue' },
);

if (result === learn) {
void this.learnAboutPro({ source: 'notification', detail: { action: 'preview-started' } }, source);
}
}, 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,34 @@ export class GlFeatureGatePlusState extends LitElement {

case SubscriptionState.Community:
case SubscriptionState.ProPreviewExpired:
return html`
${feature !== 'graph'
? html`<p>
Use on privately-hosted repos requires
<a href="${urls.gitlensProVsCommunity}">GitLens Pro</a>.
</p>`
: nothing}
if (feature === 'graph' && this.state === SubscriptionState.Community) {
return html`
<gl-button
appearance="${appearance}"
href="${generateCommandLink(Commands.PlusStartPreviewTrial, this.source)}"
>Continue</gl-button
>
<p>
Continuing gives you 3 days to preview
${this.featureWithArticleIfNeeded
? `${this.featureWithArticleIfNeeded} and other `
: ''}local
Pro features.<br />
${appearance !== 'alert' ? html`<br />` : ''} For full access to Pro features
<a href="${generateCommandLink(Commands.PlusSignUp, this.source)}"
>start your free ${proTrialLengthInDays}-day Pro trial</a
>
or
<a href="${generateCommandLink(Commands.PlusLogin, this.source)}" title="Sign In">sign in</a
>.
</p>
`;
}

return html`<p>
Use on privately-hosted repos requires
<a href="${urls.gitlensProVsCommunity}">GitLens Pro</a>.
</p>
<gl-button
appearance="${appearance}"
href="${generateCommandLink(Commands.PlusSignUp, this.source)}"
Expand All @@ -137,8 +158,7 @@ export class GlFeatureGatePlusState extends LitElement {
<p>
Get ${proTrialLengthInDays} days of GitLens Pro for free - no credit card required. Or
<a href="${generateCommandLink(Commands.PlusLogin, this.source)}" title="Sign In">sign in</a>.
</p>
`;
</p> `;

case SubscriptionState.ProTrialExpired:
return html`<p>
Expand Down

0 comments on commit c99fc69

Please sign in to comment.