Skip to content

Commit 78a823a

Browse files
sergeibbbd13
authored andcommitted
Removes "Learn more" from the Subscription modal
(#3837, #4390)
1 parent 3e06679 commit 78a823a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/plus/gk/subscriptionService.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ import { flatten } from '../../system/object';
6262
import { pauseOnCancelOrTimeout } from '../../system/promise';
6363
import { pluralize } from '../../system/string';
6464
import { createDisposable } from '../../system/unifiedDisposable';
65+
import { isWalkthroughSupported } from '../../telemetry/walkthroughStateProvider';
6566
import { LoginUriPathPrefix } from './authenticationConnection';
6667
import { authenticationProviderScopes } from './authenticationProvider';
6768
import type { GKCheckInResponse } from './models/checkin';
@@ -482,13 +483,13 @@ export class SubscriptionService implements Disposable {
482483
void this.resendVerification(source);
483484
}
484485
} else if (isSubscriptionPaid(this._subscription)) {
485-
const learn: MessageItem = { title: 'Learn More' };
486+
const learn: MessageItem | undefined = isWalkthroughSupported() ? { title: 'Learn More' } : undefined;
486487
const confirm: MessageItem = { title: 'Continue', isCloseAffordance: true };
487488
const result = await window.showInformationMessage(
488489
`You are now on ${actual.name} and have full access to all GitLens Pro features.`,
489490
{ modal: true },
490491
confirm,
491-
learn,
492+
...(learn ? [learn] : []),
492493
);
493494

494495
if (result === learn) {
@@ -497,7 +498,7 @@ export class SubscriptionService implements Disposable {
497498
} else if (isSubscriptionTrial(this._subscription)) {
498499
const days = getSubscriptionTimeRemaining(this._subscription, 'days') ?? 0;
499500

500-
const learn: MessageItem = { title: 'Learn More' };
501+
const learn: MessageItem | undefined = isWalkthroughSupported() ? { title: 'Learn More' } : undefined;
501502
const confirm: MessageItem = { title: 'Continue', isCloseAffordance: true };
502503
const result = await window.showInformationMessage(
503504
`Welcome to your ${effective.name} Trial.\n\nYou now have full access to all GitLens Pro features for ${
@@ -508,15 +509,17 @@ export class SubscriptionService implements Disposable {
508509
detail: 'Your trial also includes access to the GitKraken DevEx platform, unleashing powerful Git visualization & productivity capabilities everywhere you work: IDE, desktop, browser, and terminal.',
509510
},
510511
confirm,
511-
learn,
512+
...(learn ? [learn] : []),
512513
);
513514

514515
if (result === learn) {
515516
void this.learnAboutPro({ source: 'prompt', detail: { action: 'trial-started' } }, source);
516517
}
517518
} else {
518519
const upgrade: MessageItem = { title: 'Upgrade to Pro' };
519-
const learn: MessageItem = { title: 'Community vs. Pro' };
520+
const learn: MessageItem | undefined = isWalkthroughSupported()
521+
? { title: 'Community vs. Pro' }
522+
: undefined;
520523
const confirm: MessageItem = { title: 'Continue', isCloseAffordance: true };
521524
const result = await window.showInformationMessage(
522525
`You are now on ${actual.name}.`,
@@ -525,7 +528,7 @@ export class SubscriptionService implements Disposable {
525528
detail: 'You only have access to Pro features on publicly-hosted repos. For full access to all Pro features, please upgrade to GitLens Pro.',
526529
},
527530
upgrade,
528-
learn,
531+
...(learn ? [learn] : []),
529532
confirm,
530533
);
531534

0 commit comments

Comments
 (0)