[PM-5300] Use deep linking for premium (#6432)
Resolves the get premium links not working in the browser extension. Replaces them with the deep links instead.
This commit is contained in:
parent
03c6037a9c
commit
5810b0c7a2
|
@ -95,9 +95,7 @@ export class LoginComponent extends BaseLoginComponent implements OnInit {
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
|
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
|
||||||
this.route.queryParams.pipe(first()).subscribe(async (qParams) => {
|
this.route.queryParams.pipe(first()).subscribe(async (qParams) => {
|
||||||
if (qParams.premium != null) {
|
if (qParams.org != null) {
|
||||||
this.routerService.setPreviousUrl("/settings/premium");
|
|
||||||
} else if (qParams.org != null) {
|
|
||||||
const route = this.router.createUrlTree(["create-organization"], {
|
const route = this.router.createUrlTree(["create-organization"], {
|
||||||
queryParams: { plan: qParams.org },
|
queryParams: { plan: qParams.org },
|
||||||
});
|
});
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
</p>
|
</p>
|
||||||
<a
|
<a
|
||||||
bitButton
|
bitButton
|
||||||
href="{{ this.cloudWebVaultUrl }}/#/settings/premium"
|
href="{{ this.cloudWebVaultUrl }}/#/settings/subscription/premium"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
buttonType="secondary"
|
buttonType="secondary"
|
||||||
|
|
|
@ -197,7 +197,9 @@ export class AttachmentsComponent implements OnInit {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
this.platformUtilsService.launchUri("https://vault.bitwarden.com/#/?premium=purchase");
|
this.platformUtilsService.launchUri(
|
||||||
|
"https://vault.bitwarden.com/#/settings/subscription/premium",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,9 @@ export class PremiumComponent implements OnInit {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
this.platformUtilsService.launchUri(`${this.cloudWebVaultUrl}/#/?premium=purchase`);
|
this.platformUtilsService.launchUri(
|
||||||
|
`${this.cloudWebVaultUrl}/#/settings/subscription/premium`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +64,9 @@ export class PremiumComponent implements OnInit {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
this.platformUtilsService.launchUri(`${this.cloudWebVaultUrl}/#/?premium=manage`);
|
this.platformUtilsService.launchUri(
|
||||||
|
`${this.cloudWebVaultUrl}/#/settings/subscription/premium`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue