web/satellite: pass query param on satellite switch in signup form
If "partner" query param is set on signup screen we pass it on satellite switch. Issue: https://github.com/storj/storj/issues/4955 Change-Id: I59039d6ae660d8790390e59650de0ce1e3bba1b4
This commit is contained in:
parent
87e1528104
commit
08120d1445
@ -42,7 +42,7 @@
|
|||||||
v-for="(sat, index) in partneredSatellites"
|
v-for="(sat, index) in partneredSatellites"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="register-area__input-area__expand__dropdown__item"
|
class="register-area__input-area__expand__dropdown__item"
|
||||||
:href="`${sat.address}/signup`"
|
:href="sat.address"
|
||||||
>
|
>
|
||||||
{{ sat.name }}
|
{{ sat.name }}
|
||||||
</a>
|
</a>
|
||||||
@ -321,10 +321,10 @@ export default class RegisterArea extends Vue {
|
|||||||
public readonly analytics: AnalyticsHttpApi = new AnalyticsHttpApi();
|
public readonly analytics: AnalyticsHttpApi = new AnalyticsHttpApi();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lifecycle hook after initial render.
|
* Lifecycle hook before initial render.
|
||||||
* Sets up variables from route params.
|
* Sets up variables from route params.
|
||||||
*/
|
*/
|
||||||
public mounted(): void {
|
public beforeMount(): void {
|
||||||
if (this.$route.query.token) {
|
if (this.$route.query.token) {
|
||||||
this.secret = this.$route.query.token.toString();
|
this.secret = this.$route.query.token.toString();
|
||||||
}
|
}
|
||||||
@ -433,7 +433,16 @@ export default class RegisterArea extends Vue {
|
|||||||
* Information about partnered satellites, including name and signup link.
|
* Information about partnered satellites, including name and signup link.
|
||||||
*/
|
*/
|
||||||
public get partneredSatellites(): PartneredSatellite[] {
|
public get partneredSatellites(): PartneredSatellite[] {
|
||||||
return this.$store.state.appStateModule.partneredSatellites;
|
const satellites = this.$store.state.appStateModule.partneredSatellites;
|
||||||
|
return satellites.map((s: PartneredSatellite) => {
|
||||||
|
s.address = `${s.address}/signup`;
|
||||||
|
|
||||||
|
if (this.user.partner) {
|
||||||
|
s.address = `${s.address}?partner=${this.user.partner}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return s;
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user