check key and premium after sync
This commit is contained in:
parent
aa3d69cb94
commit
e5226d7ffc
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit 38c26d9649f613e4f8987e4e4727a0e90a21233b
|
Subproject commit 852b4571b34d60845f37956e9468f845d9dd627e
|
|
@ -88,37 +88,20 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.showVerifyEmail = !(await this.tokenService.getEmailVerified());
|
this.showVerifyEmail = !(await this.tokenService.getEmailVerified());
|
||||||
this.showBrowserOutdated = window.navigator.userAgent.indexOf('MSIE') !== -1;
|
this.showBrowserOutdated = window.navigator.userAgent.indexOf('MSIE') !== -1;
|
||||||
const hasEncKey = await this.cryptoService.hasEncKey();
|
|
||||||
this.showUpdateKey = !hasEncKey;
|
|
||||||
const canAccessPremium = await this.userService.canAccessPremium();
|
|
||||||
|
|
||||||
this.route.queryParams.subscribe(async (params) => {
|
this.route.queryParams.subscribe(async (params) => {
|
||||||
await this.syncService.fullSync(false);
|
await this.syncService.fullSync(false);
|
||||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {
|
|
||||||
this.ngZone.run(async () => {
|
this.showUpdateKey = !(await this.cryptoService.hasEncKey());
|
||||||
switch (message.command) {
|
const canAccessPremium = await this.userService.canAccessPremium();
|
||||||
case 'syncCompleted':
|
this.showPremiumCallout = !this.showVerifyEmail && !canAccessPremium &&
|
||||||
if (message.successfully) {
|
!this.platformUtilsService.isSelfHost();
|
||||||
await Promise.all([
|
|
||||||
this.groupingsComponent.load(),
|
|
||||||
this.organizationsComponent.load(),
|
|
||||||
this.ciphersComponent.load(this.ciphersComponent.filter),
|
|
||||||
]);
|
|
||||||
this.changeDetectorRef.detectChanges();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this.groupingsComponent.load(),
|
this.groupingsComponent.load(),
|
||||||
this.organizationsComponent.load(),
|
this.organizationsComponent.load(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
this.showPremiumCallout = !this.showVerifyEmail && !canAccessPremium &&
|
|
||||||
!this.platformUtilsService.isSelfHost();
|
|
||||||
|
|
||||||
if (params == null) {
|
if (params == null) {
|
||||||
this.groupingsComponent.selectedAll = true;
|
this.groupingsComponent.selectedAll = true;
|
||||||
await this.ciphersComponent.load();
|
await this.ciphersComponent.load();
|
||||||
|
@ -143,6 +126,23 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||||
this.groupingsComponent.selectedAll = true;
|
this.groupingsComponent.selectedAll = true;
|
||||||
await this.ciphersComponent.load();
|
await this.ciphersComponent.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {
|
||||||
|
this.ngZone.run(async () => {
|
||||||
|
switch (message.command) {
|
||||||
|
case 'syncCompleted':
|
||||||
|
if (message.successfully) {
|
||||||
|
await Promise.all([
|
||||||
|
this.groupingsComponent.load(),
|
||||||
|
this.organizationsComponent.load(),
|
||||||
|
this.ciphersComponent.load(this.ciphersComponent.filter),
|
||||||
|
]);
|
||||||
|
this.changeDetectorRef.detectChanges();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue