[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:
Oscar Hinton 2024-01-18 17:43:34 +01:00 committed by GitHub
parent 03c6037a9c
commit 5810b0c7a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 7 deletions

View File

@ -95,9 +95,7 @@ export class LoginComponent extends BaseLoginComponent implements OnInit {
async ngOnInit() {
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
this.route.queryParams.pipe(first()).subscribe(async (qParams) => {
if (qParams.premium != null) {
this.routerService.setPreviousUrl("/settings/premium");
} else if (qParams.org != null) {
if (qParams.org != null) {
const route = this.router.createUrlTree(["create-organization"], {
queryParams: { plan: qParams.org },
});

View File

@ -54,7 +54,7 @@
</p>
<a
bitButton
href="{{ this.cloudWebVaultUrl }}/#/settings/premium"
href="{{ this.cloudWebVaultUrl }}/#/settings/subscription/premium"
target="_blank"
rel="noopener"
buttonType="secondary"

View File

@ -197,7 +197,9 @@ export class AttachmentsComponent implements OnInit {
});
if (confirmed) {
this.platformUtilsService.launchUri("https://vault.bitwarden.com/#/?premium=purchase");
this.platformUtilsService.launchUri(
"https://vault.bitwarden.com/#/settings/subscription/premium",
);
}
}
}

View File

@ -50,7 +50,9 @@ export class PremiumComponent implements OnInit {
});
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) {
this.platformUtilsService.launchUri(`${this.cloudWebVaultUrl}/#/?premium=manage`);
this.platformUtilsService.launchUri(
`${this.cloudWebVaultUrl}/#/settings/subscription/premium`,
);
}
}
}