Skip to content

Commit 8b84619

Browse files
committed
Updates promos
1 parent 3d8749a commit 8b84619

File tree

7 files changed

+30
-42
lines changed

7 files changed

+30
-42
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ GitLens supercharges your Git experience in VS Code. Maintaining focus is critic
88

99
GitLens sets itself apart from other Git tools through its deep level of integration, versatility, and ease of use. GitLens sits directly within your editor, reducing context switching and promoting a more efficient workflow. We know Git is hard and strive to make it as easy as possible while also going beyond the basics with rich visualizations and step-by-step guidance and safety, just to name a few.
1010

11-
> 💡 **Limited-time:** [Upgrade to Pro](https://gitkraken.dev/purchase/checkout?source=gitlens&product=gitlens&promoCode=GLLAUNCHPAD24&context=marketplace) before October 14th and save more than 75%. 💡
12-
1311
## Getting Started
1412

1513
<p>

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17552,13 +17552,18 @@
1755217552
},
1755317553
{
1755417554
"view": "gitlens.views.worktrees",
17555-
"contents": "Limited-time Sale: Save 33% or more on your 1st seat of Pro.",
17555+
"contents": "Limited-time sale: Save 33% or more on your 1st seat of Pro.",
1755617556
"when": "gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
1755717557
},
1755817558
{
1755917559
"view": "gitlens.views.worktrees",
17560-
"contents": "Launchpad Sale: Save 75% or more on GitLens Pro",
17561-
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo =~ /(launchpad|launchpad-extended)/"
17560+
"contents": "Launchpad sale: Save 75% or more on GitLens Pro",
17561+
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == launchpad-extended"
17562+
},
17563+
{
17564+
"view": "gitlens.views.worktrees",
17565+
"contents": "Limited-time sale: Save up to 80% on GitLen Pro",
17566+
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == devexdays"
1756217567
},
1756317568
{
1756417569
"view": "gitlens.views.worktrees",

src/constants.subscription.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const proPreviewLengthInDays = 3;
22
export const proTrialLengthInDays = 7;
33

4-
export type PromoKeys = 'launchpad' | 'launchpad-extended' | 'pro50';
4+
export type PromoKeys = 'devexdays' | 'launchpad-extended' | 'pro50';
55

66
export const enum SubscriptionPlanId {
77
Community = 'community',

src/git/gitProviderService.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { SubscriptionPlanId } from '../constants.subscription';
1919
import type { Container } from '../container';
2020
import { AccessDeniedError, CancellationError, ProviderNotFoundError, ProviderNotSupportedError } from '../errors';
2121
import type { FeatureAccess, Features, PlusFeatures, RepoFeatureAccess } from '../features';
22-
import { getApplicablePromo } from '../plus/gk/account/promos';
2322
import type { Subscription } from '../plus/gk/account/subscription';
2423
import { isSubscriptionPaidPlan } from '../plus/gk/account/subscription';
2524
import type { SubscriptionChangeEvent } from '../plus/gk/account/subscriptionService';
@@ -778,10 +777,6 @@ export class GitProviderService implements Disposable {
778777
}
779778

780779
if (feature === 'launchpad') {
781-
// If our launchpad graduation promo is active allow access for everyone
782-
if (getApplicablePromo(subscription.state, undefined, 'launchpad')) {
783-
return { allowed: true, subscription: { current: subscription } };
784-
}
785780
return { allowed: false, subscription: { current: subscription, required: SubscriptionPlanId.Pro } };
786781
}
787782

src/plus/gk/account/promos.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface Promo {
2121
// Must be ordered by applicable order
2222
const promos: Promo[] = [
2323
{
24-
key: 'launchpad',
24+
key: 'launchpad-extended',
2525
code: 'GLLAUNCHPAD24',
2626
states: [
2727
SubscriptionState.Community,
@@ -31,15 +31,16 @@ const promos: Promo[] = [
3131
SubscriptionState.ProTrialExpired,
3232
SubscriptionState.ProTrialReactivationEligible,
3333
],
34-
expiresOn: new Date('2024-09-27T06:59:00.000Z').getTime(),
35-
command: { tooltip: 'Launchpad Sale: Save 75% or more on GitLens Pro' },
34+
startsOn: new Date('2024-09-27T06:59:00.000Z').getTime(),
35+
expiresOn: new Date('2024-10-14T06:59:00.000Z').getTime(),
36+
command: { tooltip: 'Launchpad sale: Save 75% or more on GitLens Pro' },
3637
quickpick: {
37-
detail: '$(rocket) Launchpad Sale: Save 75% or more on GitLens Pro',
38+
detail: '$(rocket) Launchpad sale: Save 75% or more on GitLens Pro',
3839
},
3940
},
4041
{
41-
key: 'launchpad-extended',
42-
code: 'GLLAUNCHPAD24',
42+
key: 'devexdays',
43+
code: 'DEXEXDAYS24',
4344
states: [
4445
SubscriptionState.Community,
4546
SubscriptionState.ProPreview,
@@ -48,11 +49,12 @@ const promos: Promo[] = [
4849
SubscriptionState.ProTrialExpired,
4950
SubscriptionState.ProTrialReactivationEligible,
5051
],
51-
startsOn: new Date('2024-09-27T06:59:00.000Z').getTime(),
52-
expiresOn: new Date('2024-10-14T06:59:00.000Z').getTime(),
53-
command: { tooltip: 'Launchpad Sale: Save 75% or more on GitLens Pro' },
52+
startsOn: new Date('2024-10-13T06:59:00.000Z').getTime(),
53+
expiresOn: new Date('2024-11-05T06:59:00.000Z').getTime(),
54+
command: { tooltip: 'Limited-Time sale: Save up to 80% off GitLens Pro' },
55+
locations: ['account', 'badge', 'gate'],
5456
quickpick: {
55-
detail: '$(rocket) Launchpad Sale: Save 75% or more on GitLens Pro',
57+
detail: '$(star-full) Limited-Time sale: Save up to 80% off GitLens Pro',
5658
},
5759
},
5860
{
@@ -65,9 +67,9 @@ const promos: Promo[] = [
6567
SubscriptionState.ProTrialExpired,
6668
SubscriptionState.ProTrialReactivationEligible,
6769
],
68-
command: { tooltip: 'Limited-Time Sale: Save 33% or more on your 1st seat of Pro. See your special price' },
70+
command: { tooltip: 'Limited-Time sale: Save 33% or more on your 1st seat of Pro. See your special price' },
6971
quickpick: {
70-
detail: '$(star-full) Limited-Time Sale: Save 33% or more on your 1st seat of Pro',
72+
detail: '$(star-full) Limited-Time sale: Save 33% or more on your 1st seat of Pro',
7173
},
7274
},
7375
];

src/plus/launchpad/launchpad.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ import { interpolate, pluralize } from '../../system/string';
5353
import { executeCommand } from '../../system/vscode/command';
5454
import { configuration } from '../../system/vscode/configuration';
5555
import { openUrl } from '../../system/vscode/utils';
56-
import { getApplicablePromo } from '../gk/account/promos';
5756
import { ProviderBuildStatusState, ProviderPullRequestReviewState } from '../integrations/providers/models';
5857
import type {
5958
LaunchpadAction,
@@ -112,7 +111,6 @@ interface Context {
112111
collapsed: Map<LaunchpadGroup, boolean>;
113112
telemetryContext: LaunchpadTelemetryContext | undefined;
114113
connectedIntegrations: Map<IntegrationId, boolean>;
115-
showGraduationPromo: boolean;
116114
}
117115

118116
interface GroupedLaunchpadItem extends LaunchpadItem {
@@ -221,7 +219,6 @@ export class LaunchpadCommand extends QuickCommand<State> {
221219
collapsed: collapsed,
222220
telemetryContext: this.telemetryContext,
223221
connectedIntegrations: await this.container.launchpad.getConnectedIntegrations(),
224-
showGraduationPromo: false,
225222
};
226223

227224
let opened = false;
@@ -266,9 +263,6 @@ export class LaunchpadCommand extends QuickCommand<State> {
266263
const result = yield* ensureAccessStep(state, context, PlusFeatures.Launchpad);
267264
if (result === StepResultBreak) continue;
268265

269-
context.showGraduationPromo =
270-
getApplicablePromo(result.subscription.current.state, undefined, 'launchpad') != null;
271-
272266
await updateContextItems(this.container, context, { force: newlyConnected });
273267

274268
if (state.counter < 1 || state.item == null) {
@@ -378,16 +372,6 @@ export class LaunchpadCommand extends QuickCommand<State> {
378372
const hasDisconnectedIntegrations = [...context.connectedIntegrations.values()].some(c => !c);
379373
const getItems = (result: LaunchpadCategorizedResult) => {
380374
const items: (LaunchpadItemQuickPickItem | DirectiveQuickPickItem | ConnectMoreIntegrationsItem)[] = [];
381-
if (context.showGraduationPromo) {
382-
items.push(
383-
createDirectiveQuickPickItem(Directive.RequiresPaidSubscription, undefined, {
384-
label: `Preview access of Launchpad will end on September 27th`,
385-
detail: '$(blank) Upgrade before then to save 75% or more on GitLens Pro',
386-
iconPath: new ThemeIcon('megaphone'),
387-
buttons: [LearnAboutProQuickInputButton],
388-
}),
389-
);
390-
}
391375

392376
if (result.items?.length) {
393377
const uiGroups = groupAndSortLaunchpadItems(result.items);

src/webviews/apps/shared/components/promo.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,17 @@ export class GlPromo extends LitElement {
8181
switch (promo.key) {
8282
case 'pro50':
8383
return html`<span class="content${this.type === 'link' ? nothing : ' muted'}"
84-
>Limited-Time Sale: <b>Save 33% or more on your 1st seat of Pro.</b></span
84+
>Limited-Time sale: <b>Save 33% or more</b> on your 1st seat of Pro</span
8585
>`;
8686

87-
case 'launchpad':
8887
case 'launchpad-extended':
8988
return html`<span class="content${this.type === 'link' ? nothing : ' muted'}"
90-
>Launchpad Sale: <b>Save 75% or more on GitLens Pro.</b></span
89+
>Launchpad sale: <b>Save 75% or more</b> on GitLens Pro</span
90+
>`;
91+
92+
case 'devexdays':
93+
return html`<span class="content${this.type === 'link' ? nothing : ' muted'}"
94+
>Limited-time sale: <b>Save up to 80%</b> on GitLen Pro</span
9195
>`;
9296
}
9397
}

0 commit comments

Comments
 (0)