Skip to content

Commit 7f3dcbc

Browse files
committed
Fixes launchpad view welcome views
1 parent a4c53a8 commit 7f3dcbc

File tree

4 files changed

+47
-44
lines changed

4 files changed

+47
-44
lines changed

contributions.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13760,39 +13760,39 @@
1376013760
},
1376113761
{
1376213762
"contents": "[Connect an Integration...](command:gitlens.showLaunchpad?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nAllows Launchpad to organize your pull requests into actionable groups and keep your team unblocked.",
13763-
"when": "gitlens:launchpad:connect"
13763+
"when": "!gitlens:launchpad:connected"
1376413764
},
1376513765
{
1376613766
"contents": "[Resend Verification Email](command:gitlens.plus.resendVerification?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nYou must verify your email before you can continue or [recheck Status](command:gitlens.plus.validate?%7B%22source%22%3A%22launchpad-view%22%7D).",
13767-
"when": "!gitlens:launchpad:connect && gitlens:plus:state == -1"
13767+
"when": "gitlens:launchpad:connected && gitlens:plus:state == -1"
1376813768
},
1376913769
{
1377013770
"contents": "[Continue](command:gitlens.plus.startPreviewTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nContinuing gives you 3 days to preview Launchpad and other local Pro features for 3 days. [Start 14-day Pro trial](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D) or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D) for full access to Pro features.",
13771-
"when": "false && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 0"
13771+
"when": "false && gitlens:launchpad:connected && gitlens:plus:state == 0"
1377213772
},
1377313773
{
1377413774
"contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).",
13775-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && (gitlens:plus:state == 0 || gitlens:plus:state == 2)"
13775+
"when": "gitlens:launchpad:connected && (gitlens:plus:state == 0 || gitlens:plus:state == 2)"
1377613776
},
1377713777
{
1377813778
"contents": "[Upgrade to Pro](command:gitlens.plus.upgrade?%7B%22source%22%3A%22launchpad-view%22%7D)",
13779-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4"
13779+
"when": "gitlens:launchpad:connected && gitlens:plus:state == 4"
1378013780
},
1378113781
{
1378213782
"contents": "Limited-time sale on GitLens Pro.",
13783-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo && gitlens:promo != pro50"
13783+
"when": "gitlens:launchpad:connected && gitlens:plus:state == 4 && gitlens:promo && gitlens:promo != pro50"
1378413784
},
1378513785
{
1378613786
"contents": "Save 33% or more on GitLens Pro.",
13787-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
13787+
"when": "gitlens:launchpad:connected && gitlens:plus:state == 4 && gitlens:promo == pro50"
1378813788
},
1378913789
{
1379013790
"contents": "Your Pro trial has ended. Please upgrade for full access to Launchpad and other Pro features.",
13791-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4"
13791+
"when": "gitlens:launchpad:connected && gitlens:plus:state == 4"
1379213792
},
1379313793
{
1379413794
"contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!",
13795-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 5"
13795+
"when": "gitlens:launchpad:connected && gitlens:plus:state == 5"
1379613796
}
1379713797
]
1379813798
},
@@ -13867,39 +13867,39 @@
1386713867
},
1386813868
{
1386913869
"contents": "[Connect an Integration...](command:gitlens.showLaunchpad?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nAllows Launchpad to organize your pull requests into actionable groups and keep your team unblocked.",
13870-
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connect"
13870+
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connected"
1387113871
},
1387213872
{
1387313873
"contents": "[Resend Verification Email](command:gitlens.plus.resendVerification?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nYou must verify your email before you can continue or [recheck Status](command:gitlens.plus.validate?%7B%22source%22%3A%22launchpad-view%22%7D).",
13874-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:state == -1"
13874+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == -1"
1387513875
},
1387613876
{
1387713877
"contents": "[Continue](command:gitlens.plus.startPreviewTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nContinuing gives you 3 days to preview Launchpad and other local Pro features for 3 days. [Start 14-day Pro trial](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D) or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D) for full access to Pro features.",
13878-
"when": "gitlens:views:scm:grouped:view == launchpad && false && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 0"
13878+
"when": "gitlens:views:scm:grouped:view == launchpad && false && gitlens:launchpad:connected && gitlens:plus:state == 0"
1387913879
},
1388013880
{
1388113881
"contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).",
13882-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && (gitlens:plus:state == 0 || gitlens:plus:state == 2)"
13882+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && (gitlens:plus:state == 0 || gitlens:plus:state == 2)"
1388313883
},
1388413884
{
1388513885
"contents": "[Upgrade to Pro](command:gitlens.plus.upgrade?%7B%22source%22%3A%22launchpad-view%22%7D)",
13886-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4"
13886+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 4"
1388713887
},
1388813888
{
1388913889
"contents": "Limited-time sale on GitLens Pro.",
13890-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo && gitlens:promo != pro50"
13890+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 4 && gitlens:promo && gitlens:promo != pro50"
1389113891
},
1389213892
{
1389313893
"contents": "Save 33% or more on GitLens Pro.",
13894-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
13894+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 4 && gitlens:promo == pro50"
1389513895
},
1389613896
{
1389713897
"contents": "Your Pro trial has ended. Please upgrade for full access to Launchpad and other Pro features.",
13898-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4"
13898+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 4"
1389913899
},
1390013900
{
1390113901
"contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!",
13902-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 5"
13902+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 5"
1390313903
},
1390413904
{
1390513905
"contents": "Search for commits by [message](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22query%22%3A%22message%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), [author](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22query%22%3A%22author%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), [SHA](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22query%22%3A%22commit%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), [file](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22query%22%3A%22file%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D), or [changes](command:gitlens.views.searchAndCompare.searchCommits?%7B%22search%22%3A%7B%22query%22%3A%22change%3A%22%7D%2C%22prefillOnly%22%3Atrue%7D)\n\n[Search Commits...](command:gitlens.views.searchAndCompare.searchCommits)",

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20828,47 +20828,47 @@
2082820828
{
2082920829
"view": "gitlens.views.launchpad",
2083020830
"contents": "[Connect an Integration...](command:gitlens.showLaunchpad?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nAllows Launchpad to organize your pull requests into actionable groups and keep your team unblocked.",
20831-
"when": "gitlens:launchpad:connect"
20831+
"when": "!gitlens:launchpad:connected"
2083220832
},
2083320833
{
2083420834
"view": "gitlens.views.launchpad",
2083520835
"contents": "[Resend Verification Email](command:gitlens.plus.resendVerification?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nYou must verify your email before you can continue or [recheck Status](command:gitlens.plus.validate?%7B%22source%22%3A%22launchpad-view%22%7D).",
20836-
"when": "!gitlens:launchpad:connect && gitlens:plus:state == -1"
20836+
"when": "gitlens:launchpad:connected && gitlens:plus:state == -1"
2083720837
},
2083820838
{
2083920839
"view": "gitlens.views.launchpad",
2084020840
"contents": "[Continue](command:gitlens.plus.startPreviewTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nContinuing gives you 3 days to preview Launchpad and other local Pro features for 3 days. [Start 14-day Pro trial](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D) or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D) for full access to Pro features.",
20841-
"when": "false && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 0"
20841+
"when": "false && gitlens:launchpad:connected && gitlens:plus:state == 0"
2084220842
},
2084320843
{
2084420844
"view": "gitlens.views.launchpad",
2084520845
"contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).",
20846-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && (gitlens:plus:state == 0 || gitlens:plus:state == 2)"
20846+
"when": "gitlens:launchpad:connected && (gitlens:plus:state == 0 || gitlens:plus:state == 2)"
2084720847
},
2084820848
{
2084920849
"view": "gitlens.views.launchpad",
2085020850
"contents": "[Upgrade to Pro](command:gitlens.plus.upgrade?%7B%22source%22%3A%22launchpad-view%22%7D)",
20851-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4"
20851+
"when": "gitlens:launchpad:connected && gitlens:plus:state == 4"
2085220852
},
2085320853
{
2085420854
"view": "gitlens.views.launchpad",
2085520855
"contents": "Limited-time sale on GitLens Pro.",
20856-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo && gitlens:promo != pro50"
20856+
"when": "gitlens:launchpad:connected && gitlens:plus:state == 4 && gitlens:promo && gitlens:promo != pro50"
2085720857
},
2085820858
{
2085920859
"view": "gitlens.views.launchpad",
2086020860
"contents": "Save 33% or more on GitLens Pro.",
20861-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
20861+
"when": "gitlens:launchpad:connected && gitlens:plus:state == 4 && gitlens:promo == pro50"
2086220862
},
2086320863
{
2086420864
"view": "gitlens.views.launchpad",
2086520865
"contents": "Your Pro trial has ended. Please upgrade for full access to Launchpad and other Pro features.",
20866-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4"
20866+
"when": "gitlens:launchpad:connected && gitlens:plus:state == 4"
2086720867
},
2086820868
{
2086920869
"view": "gitlens.views.launchpad",
2087020870
"contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!",
20871-
"when": "!gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 5"
20871+
"when": "gitlens:launchpad:connected && gitlens:plus:state == 5"
2087220872
},
2087320873
{
2087420874
"view": "gitlens.views.scm.grouped",
@@ -20888,47 +20888,47 @@
2088820888
{
2088920889
"view": "gitlens.views.scm.grouped",
2089020890
"contents": "[Connect an Integration...](command:gitlens.showLaunchpad?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nAllows Launchpad to organize your pull requests into actionable groups and keep your team unblocked.",
20891-
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connect"
20891+
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connected"
2089220892
},
2089320893
{
2089420894
"view": "gitlens.views.scm.grouped",
2089520895
"contents": "[Resend Verification Email](command:gitlens.plus.resendVerification?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nYou must verify your email before you can continue or [recheck Status](command:gitlens.plus.validate?%7B%22source%22%3A%22launchpad-view%22%7D).",
20896-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:state == -1"
20896+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == -1"
2089720897
},
2089820898
{
2089920899
"view": "gitlens.views.scm.grouped",
2090020900
"contents": "[Continue](command:gitlens.plus.startPreviewTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nContinuing gives you 3 days to preview Launchpad and other local Pro features for 3 days. [Start 14-day Pro trial](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D) or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D) for full access to Pro features.",
20901-
"when": "gitlens:views:scm:grouped:view == launchpad && false && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 0"
20901+
"when": "gitlens:views:scm:grouped:view == launchpad && false && gitlens:launchpad:connected && gitlens:plus:state == 0"
2090220902
},
2090320903
{
2090420904
"view": "gitlens.views.scm.grouped",
2090520905
"contents": "[Try GitLens Pro](command:gitlens.plus.signUp?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nGet 14 days of GitLens Pro for free — no credit card required. Or [sign in](command:gitlens.plus.login?%7B%22source%22%3A%22launchpad-view%22%7D).",
20906-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && (gitlens:plus:state == 0 || gitlens:plus:state == 2)"
20906+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && (gitlens:plus:state == 0 || gitlens:plus:state == 2)"
2090720907
},
2090820908
{
2090920909
"view": "gitlens.views.scm.grouped",
2091020910
"contents": "[Upgrade to Pro](command:gitlens.plus.upgrade?%7B%22source%22%3A%22launchpad-view%22%7D)",
20911-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4"
20911+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 4"
2091220912
},
2091320913
{
2091420914
"view": "gitlens.views.scm.grouped",
2091520915
"contents": "Limited-time sale on GitLens Pro.",
20916-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo && gitlens:promo != pro50"
20916+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 4 && gitlens:promo && gitlens:promo != pro50"
2091720917
},
2091820918
{
2091920919
"view": "gitlens.views.scm.grouped",
2092020920
"contents": "Save 33% or more on GitLens Pro.",
20921-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4 && gitlens:promo == pro50"
20921+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 4 && gitlens:promo == pro50"
2092220922
},
2092320923
{
2092420924
"view": "gitlens.views.scm.grouped",
2092520925
"contents": "Your Pro trial has ended. Please upgrade for full access to Launchpad and other Pro features.",
20926-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 4"
20926+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 4"
2092720927
},
2092820928
{
2092920929
"view": "gitlens.views.scm.grouped",
2093020930
"contents": "[Continue](command:gitlens.plus.reactivateProTrial?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nReactivate your Pro trial and experience Launchpad and all the new Pro features — free for another 14 days!",
20931-
"when": "gitlens:views:scm:grouped:view == launchpad && !gitlens:launchpad:connect && gitlens:plus:required && gitlens:plus:state == 5"
20931+
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:launchpad:connected && gitlens:plus:state == 5"
2093220932
},
2093320933
{
2093420934
"view": "gitlens.views.scm.grouped",

src/constants.context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type ContextKeys = {
1515
'gitlens:gk:organization:drafts:byob': boolean;
1616
'gitlens:gk:organization:drafts:enabled': boolean;
1717
'gitlens:hasVirtualFolders': boolean;
18-
'gitlens:launchpad:connect': boolean;
18+
'gitlens:launchpad:connected': boolean;
1919
/** Indicates that this is the first run of a new install of GitLens */
2020
'gitlens:install:new': boolean;
2121
/** Indicates that this is the first run after an upgrade of GitLens */

src/plus/launchpad/launchpadProvider.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -914,11 +914,12 @@ export class LaunchpadProvider implements Disposable {
914914
if (integration == null) continue;
915915

916916
if (integration.maybeConnected ?? (await integration.isConnected())) {
917+
void setContext('gitlens:launchpad:connected', true);
917918
return true;
918919
}
919920
}
920921

921-
void setContext('gitlens:launchpad:connect', true);
922+
void setContext('gitlens:launchpad:connected', false);
922923
return false;
923924
}
924925

@@ -937,7 +938,10 @@ export class LaunchpadProvider implements Disposable {
937938
}),
938939
);
939940

940-
void setContext('gitlens:launchpad:connect', !some(connected.values(), c => c));
941+
void setContext(
942+
'gitlens:launchpad:connected',
943+
some(connected.values(), c => c),
944+
);
941945
return connected;
942946
}
943947

@@ -992,11 +996,10 @@ export class LaunchpadProvider implements Disposable {
992996

993997
private async onIntegrationConnectionStateChanged(e: ConnectionStateChangeEvent) {
994998
if (isSupportedLaunchpadIntegrationId(e.key)) {
995-
if (e.reason === 'connected') {
996-
void setContext('gitlens:launchpad:connect', false);
997-
} else {
998-
void setContext('gitlens:launchpad:connect', !(await this.hasConnectedIntegration()));
999-
}
999+
void setContext(
1000+
'gitlens:launchpad:connected',
1001+
e.reason === 'connected' ? true : await this.hasConnectedIntegration(),
1002+
);
10001003
}
10011004
}
10021005
}

0 commit comments

Comments
 (0)