mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-03 18:28:13 +01:00
show reports with upgrade message
This commit is contained in:
parent
ceca4fbe53
commit
4bb9051136
@ -12,9 +12,14 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card" *ngIf="accessReports">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header d-flex">
|
||||||
{{'reports' | i18n}}
|
{{'reports' | i18n}}
|
||||||
|
<div class="ml-auto">
|
||||||
|
<a href="#" appStopClick class="badge badge-primary" *ngIf="!accessReport" (click)="upgradeOrganization()">
|
||||||
|
{{'upgrade' | i18n}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group list-group-flush">
|
<div class="list-group list-group-flush">
|
||||||
<a routerLink="exposed-passwords-report" class="list-group-item" routerLinkActive="active">
|
<a routerLink="exposed-passwords-report" class="list-group-item" routerLinkActive="active">
|
||||||
|
@ -3,6 +3,7 @@ import { ActivatedRoute } from '@angular/router';
|
|||||||
|
|
||||||
import { Organization } from 'jslib/models/domain/organization';
|
import { Organization } from 'jslib/models/domain/organization';
|
||||||
|
|
||||||
|
import { MessagingService } from 'jslib/abstractions/messaging.service';
|
||||||
import { UserService } from 'jslib/abstractions/user.service';
|
import { UserService } from 'jslib/abstractions/user.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -13,7 +14,8 @@ export class ToolsComponent {
|
|||||||
organization: Organization;
|
organization: Organization;
|
||||||
accessReports = false;
|
accessReports = false;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private userService: UserService) { }
|
constructor(private route: ActivatedRoute, private userService: UserService,
|
||||||
|
private messagingService: MessagingService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.parent.params.subscribe(async (params) => {
|
this.route.parent.params.subscribe(async (params) => {
|
||||||
@ -24,4 +26,7 @@ export class ToolsComponent {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
upgradeOrganization() {
|
||||||
|
this.messagingService.send('upgradeOrganization', { organizationId: this.organization.id });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ export class ToolsComponent implements OnInit {
|
|||||||
this.canAccessPremium = await this.userService.canAccessPremium();
|
this.canAccessPremium = await this.userService.canAccessPremium();
|
||||||
}
|
}
|
||||||
|
|
||||||
async premiumRequired() {
|
premiumRequired() {
|
||||||
if (!this.canAccessPremium) {
|
if (!this.canAccessPremium) {
|
||||||
this.messagingService.send('premiumRequired');
|
this.messagingService.send('premiumRequired');
|
||||||
return;
|
return;
|
||||||
|
@ -97,14 +97,14 @@ export class AddEditComponent extends BaseAddEditComponent {
|
|||||||
return confirmed;
|
return confirmed;
|
||||||
}
|
}
|
||||||
|
|
||||||
async premiumRequired() {
|
premiumRequired() {
|
||||||
if (!this.canAccessPremium) {
|
if (!this.canAccessPremium) {
|
||||||
this.messagingService.send('premiumRequired');
|
this.messagingService.send('premiumRequired');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async upgradeOrganization() {
|
upgradeOrganization() {
|
||||||
this.messagingService.send('upgradeOrganization', { organizationId: this.cipher.organizationId });
|
this.messagingService.send('upgradeOrganization', { organizationId: this.cipher.organizationId });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user