Skip to content

Commit 46522d5

Browse files
committed
Adds promo
1 parent 3b6d378 commit 46522d5

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

package.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19071,6 +19071,16 @@
1907119071
"contents": "Save 33% or more on your 1st seat of Pro.",
1907219072
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
1907319073
},
19074+
{
19075+
"view": "gitlens.views.launchpad",
19076+
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19077+
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
19078+
},
19079+
{
19080+
"view": "gitlens.views.scm.grouped",
19081+
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19082+
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday && gitlens:views:scm:grouped:view == launchpad"
19083+
},
1907419084
{
1907519085
"view": "gitlens.views.launchpad",
1907619086
"contents": "Save more than 55% during our GitLens 16 sale!",
@@ -19299,6 +19309,16 @@
1929919309
"contents": "Save 33% or more on your 1st seat of Pro.",
1930019310
"when": "gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
1930119311
},
19312+
{
19313+
"view": "gitlens.views.worktrees",
19314+
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19315+
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
19316+
},
19317+
{
19318+
"view": "gitlens.views.scm.grouped",
19319+
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19320+
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday && gitlens:views:scm:grouped:view == worktrees"
19321+
},
1930219322
{
1930319323
"view": "gitlens.views.worktrees",
1930419324
"contents": "Save more than 55% during our GitLens 16 sale!",

src/constants.subscription.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const proFeaturePreviewUsageDurationInDays = 1;
33
export const proPreviewLengthInDays = 0;
44
export const proTrialLengthInDays = 14;
55

6-
export type PromoKeys = 'cybersale24' | 'gitlens16' | 'pro50';
6+
export type PromoKeys = 'gkholiday' | 'cybersale24' | 'gitlens16' | 'pro50';
77

88
export const enum SubscriptionPlanId {
99
Community = 'community',

src/plus/gk/account/promos.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@ export interface Promo {
2020

2121
// Must be ordered by applicable order
2222
const promos: Promo[] = [
23+
{
24+
key: 'gkholiday',
25+
code: 'GKHOLIDAY',
26+
states: [
27+
SubscriptionState.Community,
28+
SubscriptionState.ProPreview,
29+
SubscriptionState.ProPreviewExpired,
30+
SubscriptionState.ProTrial,
31+
SubscriptionState.ProTrialExpired,
32+
SubscriptionState.ProTrialReactivationEligible,
33+
],
34+
startsOn: new Date('2024-12-09T06:59:00.000Z').getTime(),
35+
expiresOn: new Date('2025-01-07T06:59:00.000Z').getTime(),
36+
command: { tooltip: 'Get the gift of a better DevEx in 2025! Save up to 80% now' },
37+
quickpick: {
38+
detail: '$(star-full) Get the gift of a better DevEx in 2025! Save up to 80% now',
39+
},
40+
},
2341
{
2442
key: 'gitlens16',
2543
code: 'GITLENS16',

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ export class GlPromo extends LitElement {
7979

8080
private renderPromo(promo: Promo) {
8181
switch (promo.key) {
82+
case 'gkholiday':
83+
return html`<span class="content${this.type === 'link' ? nothing : ' muted'}"
84+
>Get the gift of a better DevEx in 2025! <b>Save up to 80% now</b></span
85+
>`;
86+
8287
case 'cybersale24':
8388
return html`<span class="content${this.type === 'link' ? nothing : ' muted'}"
8489
>Cyber Sale: <b>Save up to 85%</b> on GitLens Pro — our best deal of the year!</span

0 commit comments

Comments
 (0)