Skip to content

Commit 1ac7c8b

Browse files
committed
Updates promos
1 parent 6c3356a commit 1ac7c8b

File tree

8 files changed

+47
-102
lines changed

8 files changed

+47
-102
lines changed

contributions.json

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12658,12 +12658,8 @@
1265812658
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4"
1265912659
},
1266012660
{
12661-
"contents": "Save 33% or more on your 1st seat of Pro.",
12662-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
12663-
},
12664-
{
12665-
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
12666-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
12661+
"contents": "Save 55% or more on your 1st seat of Pro.",
12662+
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
1266712663
},
1266812664
{
1266912665
"contents": "Your Pro trial has ended. Please upgrade for full access to Launchpad and other Pro features.",
@@ -12765,12 +12761,8 @@
1276512761
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4"
1276612762
},
1276712763
{
12768-
"contents": "Save 33% or more on your 1st seat of Pro.",
12769-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
12770-
},
12771-
{
12772-
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
12773-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
12764+
"contents": "Save 55% or more on your 1st seat of Pro.",
12765+
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
1277412766
},
1277512767
{
1277612768
"contents": "Your Pro trial has ended. Please upgrade for full access to Launchpad and other Pro features.",
@@ -12817,12 +12809,8 @@
1281712809
"when": "gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 4"
1281812810
},
1281912811
{
12820-
"contents": "Save 33% or more on your 1st seat of Pro.",
12821-
"when": "gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
12822-
},
12823-
{
12824-
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
12825-
"when": "gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
12812+
"contents": "Save 55% or more on your 1st seat of Pro.",
12813+
"when": "gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
1282612814
},
1282712815
{
1282812816
"contents": "Your Pro trial has ended. Please upgrade for full access to Worktrees and other Pro features.",
@@ -12951,12 +12939,8 @@
1295112939
"when": "gitlens:plus:required && gitlens:plus:state == 4"
1295212940
},
1295312941
{
12954-
"contents": "Save 33% or more on your 1st seat of Pro.",
12955-
"when": "gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
12956-
},
12957-
{
12958-
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
12959-
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
12942+
"contents": "Save 55% or more on your 1st seat of Pro.",
12943+
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
1296012944
},
1296112945
{
1296212946
"contents": "Your Pro trial has ended. Please upgrade for full access to Worktrees and other Pro features.",

package.json

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19504,13 +19504,8 @@
1950419504
},
1950519505
{
1950619506
"view": "gitlens.views.launchpad",
19507-
"contents": "Save 33% or more on your 1st seat of Pro.",
19508-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
19509-
},
19510-
{
19511-
"view": "gitlens.views.launchpad",
19512-
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19513-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
19507+
"contents": "Save 55% or more on your 1st seat of Pro.",
19508+
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
1951419509
},
1951519510
{
1951619511
"view": "gitlens.views.launchpad",
@@ -19564,13 +19559,8 @@
1956419559
},
1956519560
{
1956619561
"view": "gitlens.views.scm.grouped",
19567-
"contents": "Save 33% or more on your 1st seat of Pro.",
19568-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
19569-
},
19570-
{
19571-
"view": "gitlens.views.scm.grouped",
19572-
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19573-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
19562+
"contents": "Save 55% or more on your 1st seat of Pro.",
19563+
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
1957419564
},
1957519565
{
1957619566
"view": "gitlens.views.scm.grouped",
@@ -19629,13 +19619,8 @@
1962919619
},
1963019620
{
1963119621
"view": "gitlens.views.scm.grouped",
19632-
"contents": "Save 33% or more on your 1st seat of Pro.",
19633-
"when": "gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
19634-
},
19635-
{
19636-
"view": "gitlens.views.scm.grouped",
19637-
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19638-
"when": "gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
19622+
"contents": "Save 55% or more on your 1st seat of Pro.",
19623+
"when": "gitlens:views:scm:grouped:view == worktrees && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
1963919624
},
1964019625
{
1964119626
"view": "gitlens.views.scm.grouped",
@@ -19717,13 +19702,8 @@
1971719702
},
1971819703
{
1971919704
"view": "gitlens.views.worktrees",
19720-
"contents": "Save 33% or more on your 1st seat of Pro.",
19721-
"when": "gitlens:plus:required && gitlens:plus:state == 4 && (gitlens:promo == pro50 || !gitlens:promo)"
19722-
},
19723-
{
19724-
"view": "gitlens.views.worktrees",
19725-
"contents": "Get the gift of a better DevEx in 2025! Save up to 80% now",
19726-
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == gkholiday"
19705+
"contents": "Save 55% or more on your 1st seat of Pro.",
19706+
"when": "gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
1972719707
},
1972819708
{
1972919709
"view": "gitlens.views.worktrees",

src/constants.context.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Uri } from 'vscode';
22
import type { AnnotationStatus, Keys } from './constants';
3-
import type { PromoKeys, SubscriptionPlanId, SubscriptionState } from './constants.subscription';
3+
import type { PromoKeys } from './constants.promos';
4+
import type { SubscriptionPlanId, SubscriptionState } from './constants.subscription';
45
import type { CustomEditorTypes, GroupableTreeViewTypes, WebviewTypes, WebviewViewTypes } from './constants.views';
56
import type { WalkthroughContextKeys } from './telemetry/walkthroughStateProvider';
67

src/constants.promos.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { SubscriptionState } from './constants.subscription';
2+
import type { Promo } from './plus/gk/models/promo';
3+
4+
export type PromoKeys = 'pro50';
5+
6+
// Must be ordered by applicable order
7+
export const promos: Promo[] = [
8+
{
9+
key: 'pro50',
10+
states: [
11+
SubscriptionState.Community,
12+
SubscriptionState.ProPreview,
13+
SubscriptionState.ProPreviewExpired,
14+
SubscriptionState.ProTrial,
15+
SubscriptionState.ProTrialExpired,
16+
SubscriptionState.ProTrialReactivationEligible,
17+
],
18+
command: { tooltip: 'Save 55% or more on your 1st seat of Pro.' },
19+
locations: ['account', 'badge', 'gate'],
20+
quickpick: {
21+
detail: '$(star-full) Save 55% or more on your 1st seat of Pro',
22+
},
23+
},
24+
];

src/constants.subscription.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ export const proFeaturePreviewUsageDurationInDays = 1;
33
export const proPreviewLengthInDays = 0;
44
export const proTrialLengthInDays = 14;
55

6-
export type PromoKeys = 'gkholiday' | 'pro50';
7-
86
export const enum SubscriptionPlanId {
97
Community = 'community',
108
CommunityWithAccount = 'community-with-account',

src/plus/gk/models/promo.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { PromoKeys, SubscriptionState } from '../../../constants.subscription';
1+
import type { PromoKeys } from '../../../constants.promos';
2+
import type { SubscriptionState } from '../../../constants.subscription';
23

34
export type PromoLocation = 'account' | 'badge' | 'gate' | 'home';
45

src/plus/gk/utils/promo.utils.ts

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,7 @@
1-
import type { PromoKeys } from '../../../constants.subscription';
2-
import { SubscriptionState } from '../../../constants.subscription';
1+
import type { PromoKeys } from '../../../constants.promos';
2+
import { promos } from '../../../constants.promos';
33
import type { Promo, PromoLocation } from '../models/promo';
44

5-
// Must be ordered by applicable order
6-
const promos: Promo[] = [
7-
{
8-
key: 'gkholiday',
9-
code: 'GKHOLIDAY',
10-
states: [
11-
SubscriptionState.Community,
12-
SubscriptionState.ProPreview,
13-
SubscriptionState.ProPreviewExpired,
14-
SubscriptionState.ProTrial,
15-
SubscriptionState.ProTrialExpired,
16-
SubscriptionState.ProTrialReactivationEligible,
17-
],
18-
startsOn: new Date('2024-12-09T06:59:00.000Z').getTime(),
19-
expiresOn: new Date('2025-01-07T06:59:00.000Z').getTime(),
20-
command: { tooltip: 'Get the gift of a better DevEx in 2025! Save up to 80% now' },
21-
quickpick: {
22-
detail: '$(star-full) Get the gift of a better DevEx in 2025! Save up to 80% now',
23-
},
24-
},
25-
{
26-
key: 'pro50',
27-
states: [
28-
SubscriptionState.Community,
29-
SubscriptionState.ProPreview,
30-
SubscriptionState.ProPreviewExpired,
31-
SubscriptionState.ProTrial,
32-
SubscriptionState.ProTrialExpired,
33-
SubscriptionState.ProTrialReactivationEligible,
34-
],
35-
command: { tooltip: 'Save 33% or more on your 1st seat of Pro.' },
36-
locations: ['account', 'badge', 'gate'],
37-
quickpick: {
38-
detail: '$(star-full) Save 33% or more on your 1st seat of Pro',
39-
},
40-
},
41-
];
42-
435
export function getApplicablePromo(
446
state: number | undefined,
457
location?: PromoLocation,

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,9 @@ 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-
8782
case 'pro50':
8883
return html`<span class="content${this.type === 'link' ? nothing : ' muted'}"
89-
><b>Save 33% or more</b> on your 1st seat of Pro</span
84+
><b>Save 55% or more</b> on your 1st seat of Pro</span
9085
>`;
9186

9287
default: {

0 commit comments

Comments
 (0)