1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 19:23:52 +00:00

[PM-5011][PM-7284] migrate user subscription along with update license dialog (#8659)

* migrate user subscription along with update license dialog

* migrate user subscription along with update license dialog
This commit is contained in:
vinith-kovan
2024-05-28 21:23:54 +05:30
committed by GitHub
parent 49b59840a8
commit 1b5faae7c3
5 changed files with 118 additions and 74 deletions

View File

@@ -20,6 +20,10 @@ import {
OffboardingSurveyDialogResultType,
openOffboardingSurvey,
} from "../shared/offboarding-survey.component";
import {
UpdateLicenseDialogComponent,
UpdateLicenseDialogResult,
} from "../shared/update-license-dialog.component";
@Component({
templateUrl: "user-subscription.component.html",
@@ -131,21 +135,16 @@ export class UserSubscriptionComponent implements OnInit {
});
}
updateLicense() {
updateLicense = async () => {
if (this.loading) {
return;
}
this.showUpdateLicense = true;
}
closeUpdateLicense(load: boolean) {
this.showUpdateLicense = false;
if (load) {
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.load();
const dialogRef = UpdateLicenseDialogComponent.open(this.dialogService);
const result = await lastValueFrom(dialogRef.closed);
if (result === UpdateLicenseDialogResult.Updated) {
await this.load();
}
}
};
adjustStorage = (add: boolean) => {
return async () => {