File tree Expand file tree Collapse file tree 3 files changed +27
-7
lines changed Expand file tree Collapse file tree 3 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export class HomeApp extends App<State> {
63
63
this . state . subscription = msg . params . subscription ;
64
64
this . setState ( this . state ) ;
65
65
this . updatePromos ( ) ;
66
- this . updateSubscription ( ) ;
66
+ this . updateSourceAndSubscription ( ) ;
67
67
68
68
break ;
69
69
@@ -155,10 +155,11 @@ export class HomeApp extends App<State> {
155
155
}
156
156
}
157
157
158
- private updateSubscription ( ) {
158
+ private updateSourceAndSubscription ( ) {
159
159
const { subscription } = this . state ;
160
160
const els = document . querySelectorAll < GlFeatureBadge > ( 'gl-feature-badge' ) ;
161
161
for ( const el of els ) {
162
+ el . source = { source : 'home' , detail : 'badge' } ;
162
163
el . subscription = subscription ;
163
164
}
164
165
}
@@ -170,7 +171,7 @@ export class HomeApp extends App<State> {
170
171
private updateState ( ) {
171
172
this . updateNoRepo ( ) ;
172
173
this . updatePromos ( ) ;
173
- this . updateSubscription ( ) ;
174
+ this . updateSourceAndSubscription ( ) ;
174
175
this . updateOrgSettings ( ) ;
175
176
this . updateCollapsedSections ( ) ;
176
177
}
Original file line number Diff line number Diff line change @@ -98,10 +98,15 @@ <h2 class="sticky">Get Started</h2>
98
98
< div data-visible ="try-pro ">
99
99
< p class ="h-space-half "> Unlock the full power of GitLens</ p >
100
100
< p >
101
- < gl-button appearance ="secondary " href ="command:gitlens.plus.signUp "
101
+ < gl-button
102
+ appearance ="secondary "
103
+ href ="command:gitlens.plus.signUp?%7B%22source%22%3A%22welcome%22%7D "
102
104
> Start Pro trial</ gl-button
103
105
>
104
- or < a href ="command:gitlens.plus.login " title ="Sign In "> sign in</ a >
106
+ or
107
+ < a href ="command:gitlens.plus.login?%7B%22source%22%3A%22welcome%22%7D " title ="Sign In "
108
+ > sign in</ a
109
+ >
105
110
</ p >
106
111
</ div >
107
112
</ div >
@@ -568,10 +573,15 @@ <h2 class="sticky">Get Started</h2>
568
573
< div data-visible ="try-pro ">
569
574
< p class ="h-space-half "> Unlock the full power of GitLens</ p >
570
575
< p >
571
- < gl-button appearance ="secondary " href ="command:gitlens.plus.signUp "
576
+ < gl-button
577
+ appearance ="secondary "
578
+ href ="command:gitlens.plus.signUp?%7B%22source%22%3A%22welcome%22%7D "
572
579
> Start Pro Trial</ gl-button
573
580
>
574
- or < a href ="command:gitlens.plus.login " title ="Sign In "> sign in</ a >
581
+ or
582
+ < a href ="command:gitlens.plus.login?%7B%22source%22%3A%22welcome%22%7D " title ="Sign In "
583
+ > sign in</ a
584
+ >
575
585
</ p >
576
586
</ div >
577
587
</ div >
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { IpcMessage } from '../../protocol';
5
5
import type { State } from '../../welcome/protocol' ;
6
6
import { DidChangeNotification , DidChangeOrgSettings , UpdateConfigurationCommand } from '../../welcome/protocol' ;
7
7
import { App } from '../shared/appBase' ;
8
+ import type { GlFeatureBadge } from '../shared/components/feature-badge' ;
8
9
import { DOM } from '../shared/dom' ;
9
10
import type { BlameSvg } from './components/svg-blame' ;
10
11
// import { Snow } from '../shared/snow';
@@ -101,6 +102,7 @@ export class WelcomeApp extends App<State> {
101
102
this . updateRepoState ( ) ;
102
103
this . updateAccountState ( ) ;
103
104
this . updatePromo ( ) ;
105
+ this . updateSource ( ) ;
104
106
this . updateOrgSettings ( ) ;
105
107
}
106
108
@@ -118,6 +120,13 @@ export class WelcomeApp extends App<State> {
118
120
document . getElementById ( 'promo' ) ! . hidden = ! ( canShowPromo ?? false ) ;
119
121
}
120
122
123
+ private updateSource ( ) {
124
+ const els = document . querySelectorAll < GlFeatureBadge > ( 'gl-feature-badge' ) ;
125
+ for ( const el of els ) {
126
+ el . source = { source : 'welcome' , detail : 'badge' } ;
127
+ }
128
+ }
129
+
121
130
private updateVersion ( ) {
122
131
document . getElementById ( 'version' ) ! . textContent = this . state . version ;
123
132
}
You can’t perform that action at this time.
0 commit comments