mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
Move web to apps/web and bitwarden_license/bit-web
This commit is contained in:
25
apps/web/src/app/tools/tools.component.ts
Normal file
25
apps/web/src/app/tools/tools.component.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
|
||||
import { MessagingService } from "jslib-common/abstractions/messaging.service";
|
||||
import { StateService } from "jslib-common/abstractions/state.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-tools",
|
||||
templateUrl: "tools.component.html",
|
||||
})
|
||||
export class ToolsComponent implements OnInit {
|
||||
canAccessPremium = false;
|
||||
|
||||
constructor(private stateService: StateService, private messagingService: MessagingService) {}
|
||||
|
||||
async ngOnInit() {
|
||||
this.canAccessPremium = await this.stateService.getCanAccessPremium();
|
||||
}
|
||||
|
||||
premiumRequired() {
|
||||
if (!this.canAccessPremium) {
|
||||
this.messagingService.send("premiumRequired");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user