1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

event logging on view page

This commit is contained in:
Kyle Spearrin
2019-07-09 13:11:10 -04:00
parent f3da16b230
commit 7dd11511c6
5 changed files with 15 additions and 5 deletions

View File

@@ -33,6 +33,7 @@ import { AuthService } from 'jslib/abstractions/auth.service';
import { CipherService } from 'jslib/abstractions/cipher.service';
import { CollectionService } from 'jslib/abstractions/collection.service';
import { CryptoService } from 'jslib/abstractions/crypto.service';
import { EventService } from 'jslib/abstractions/event.service';
import { FolderService } from 'jslib/abstractions/folder.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
import { LockService } from 'jslib/abstractions/lock.service';
@@ -94,7 +95,7 @@ export class AppComponent implements OnInit {
private messagingService: MessagingService, private collectionService: CollectionService,
private searchService: SearchService, private notificationsService: NotificationsService,
private platformUtilsService: PlatformUtilsService, private systemService: SystemService,
private stateService: StateService) { }
private stateService: StateService, private eventService: EventService) { }
ngOnInit() {
this.ngZone.runOutsideAngular(() => {
@@ -209,9 +210,11 @@ export class AppComponent implements OnInit {
}
private async logOut(expired: boolean) {
await this.eventService.uploadEvents();
const userId = await this.userService.getUserId();
await Promise.all([
this.eventService.clearEvents(),
this.syncService.setLastSync(new Date(0)),
this.tokenService.clearToken(),
this.cryptoService.clearKeys(),