Skip to content

Commit 3678001

Browse files
committed
Adds promo
1 parent 11932f7 commit 3678001

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
@@ -19054,6 +19054,16 @@
1905419054
"contents": "Save 33% or more on your 1st seat of Pro.",
1905519055
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo) && gitlens:views:scm:grouped:view == launchpad"
1905619056
},
19057+
{
19058+
"view": "gitlens.views.launchpad",
19059+
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19060+
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
19061+
},
19062+
{
19063+
"view": "gitlens.views.scm.grouped",
19064+
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19065+
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday && gitlens:views:scm:grouped:view == launchpad"
19066+
},
1905719067
{
1905819068
"view": "gitlens.views.launchpad",
1905919069
"contents": "Save more than 55% during our GitLens 16 sale!",
@@ -19182,6 +19192,16 @@
1918219192
"contents": "Save 33% or more on your 1st seat of Pro.",
1918319193
"when": "gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo) && gitlens:views:scm:grouped:view == worktrees"
1918419194
},
19195+
{
19196+
"view": "gitlens.views.worktrees",
19197+
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19198+
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
19199+
},
19200+
{
19201+
"view": "gitlens.views.scm.grouped",
19202+
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19203+
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday && gitlens:views:scm:grouped:view == worktrees"
19204+
},
1918519205
{
1918619206
"view": "gitlens.views.worktrees",
1918719207
"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)