Browse Source

Updates subscription notifications & status bar content

main
Eric Amodio 2 years ago
parent
commit
e05e0005f8
2 changed files with 10 additions and 7 deletions
  1. +9
    -6
      src/plus/subscription/subscriptionService.ts
  2. +1
    -1
      src/subscription.ts

+ 9
- 6
src/plus/subscription/subscriptionService.ts View File

@ -36,6 +36,7 @@ import {
getSubscriptionTimeRemaining, getSubscriptionTimeRemaining,
getTimeRemaining, getTimeRemaining,
isSubscriptionExpired, isSubscriptionExpired,
isSubscriptionPaid,
isSubscriptionTrial, isSubscriptionTrial,
SubscriptionPlanId, SubscriptionPlanId,
SubscriptionState, SubscriptionState,
@ -270,11 +271,16 @@ export class SubscriptionService implements Disposable {
if (result === learn) { if (result === learn) {
this.learn(); this.learn();
} }
} else {
} else if (isSubscriptionPaid(this._subscription)) {
void window.showInformationMessage( void window.showInformationMessage(
`Welcome to ${actual.name}. You now have additional access to GitLens+ features on private repos.`, `Welcome to ${actual.name}. You now have additional access to GitLens+ features on private repos.`,
'OK', 'OK',
); );
} else {
void window.showInformationMessage(
`Welcome to ${actual.name}. You have access to GitLens+ features on local & public repos.`,
'OK',
);
} }
} }
return loggedIn; return loggedIn;
@ -933,12 +939,9 @@ export class SubscriptionService implements Disposable {
this._statusBarSubscription.text = `${effective.name} (Trial)`; this._statusBarSubscription.text = `${effective.name} (Trial)`;
this._statusBarSubscription.tooltip = new MarkdownString( this._statusBarSubscription.tooltip = new MarkdownString(
`You are currently trialing **${
`You have ${pluralize('day', remaining ?? 0)} left in your **${
effective.name effective.name
}**, which gives you access to GitLens+ features on both public and private repos. You have ${pluralize(
'day',
remaining ?? 0,
)} remaining in your trial.\n\nClick for details`,
}** trial, which gives you additional access to GitLens+ features on private repos.\n\nClick for details`,
true, true,
); );
} }

+ 1
- 1
src/subscription.ts View File

@ -114,7 +114,7 @@ export function getSubscriptionPlan(id: SubscriptionPlanId, startedOn?: Date, ex
export function getSubscriptionPlanName(id: SubscriptionPlanId) { export function getSubscriptionPlanName(id: SubscriptionPlanId) {
switch (id) { switch (id) {
case SubscriptionPlanId.FreePlus: case SubscriptionPlanId.FreePlus:
return 'GitLens';
return 'GitLens Free';
case SubscriptionPlanId.Pro: case SubscriptionPlanId.Pro:
return 'GitLens Pro'; return 'GitLens Pro';
case SubscriptionPlanId.Teams: case SubscriptionPlanId.Teams:

Loading…
Cancel
Save