mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
sync after login
This commit is contained in:
@@ -18,6 +18,7 @@ import { AuthResult } from 'jslib/models/domain/authResult';
|
||||
|
||||
import { AuthService } from 'jslib/abstractions/auth.service';
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
@@ -31,7 +32,7 @@ export class LoginComponent {
|
||||
formPromise: Promise<AuthResult>;
|
||||
|
||||
constructor(private authService: AuthService, private router: Router, private analytics: Angulartics2,
|
||||
private toasterService: ToasterService, private i18nService: I18nService,
|
||||
private toasterService: ToasterService, private i18nService: I18nService, private syncService: SyncService,
|
||||
private componentFactoryResolver: ComponentFactoryResolver) { }
|
||||
|
||||
async submit() {
|
||||
@@ -58,9 +59,9 @@ export class LoginComponent {
|
||||
this.analytics.eventTrack.next({ action: 'Logged In To Two-step' });
|
||||
this.router.navigate(['2fa']);
|
||||
} else {
|
||||
this.syncService.fullSync(true);
|
||||
this.analytics.eventTrack.next({ action: 'Logged In' });
|
||||
this.router.navigate(['vault']);
|
||||
// TODO: sync on load to vault?
|
||||
}
|
||||
} catch { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user