mirror of
https://github.com/bitwarden/browser.git
synced 2025-03-12 13:39:14 +01:00
refactor submit logic
This commit is contained in:
parent
7d8886e4dc
commit
feb16c3fd2
@ -190,25 +190,19 @@ export class LoginComponentV2 implements OnInit, OnDestroy {
|
||||
this.loginEmailService.clearValues();
|
||||
await this.router.navigate(["update-temp-password"]);
|
||||
} else {
|
||||
// Browser/Desktop specific (start)
|
||||
if (this.clientType === ClientType.Browser || this.clientType === ClientType.Desktop) {
|
||||
await this.syncService.fullSync(true); // TODO-rr-bw: check -> browser uses `await` and desktop uses `return`. Why?
|
||||
}
|
||||
// Browser/Desktop specific (end)
|
||||
|
||||
// Web specific (start)
|
||||
await this.goAfterLogIn(authResult.userId);
|
||||
// Web specific (end)
|
||||
|
||||
// Browser/Desktop (start)
|
||||
this.loginEmailService.clearValues();
|
||||
|
||||
if (this.clientType === ClientType.Browser) {
|
||||
await this.router.navigate(["/tabs/vault"]);
|
||||
if (this.clientType === ClientType.Web) {
|
||||
await this.goAfterLogIn(authResult.userId);
|
||||
} else {
|
||||
await this.router.navigate(["vault"]);
|
||||
await this.syncService.fullSync(true); // TODO-rr-bw: browser used `await`, desktop used `return`. Why?
|
||||
|
||||
this.loginEmailService.clearValues();
|
||||
|
||||
if (this.clientType === ClientType.Browser) {
|
||||
await this.router.navigate(["/tabs/vault"]);
|
||||
} else {
|
||||
await this.router.navigate(["vault"]); // Desktop
|
||||
}
|
||||
}
|
||||
// Browser/Desktop (end)
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user