diff --git a/src/app/tools/tools.component.html b/src/app/tools/tools.component.html
index 96755575e8..1e2cbbe5e3 100644
--- a/src/app/tools/tools.component.html
+++ b/src/app/tools/tools.component.html
@@ -16,7 +16,14 @@
diff --git a/src/app/tools/tools.component.ts b/src/app/tools/tools.component.ts
index d5ffd9f356..4d7ecadc13 100644
--- a/src/app/tools/tools.component.ts
+++ b/src/app/tools/tools.component.ts
@@ -1,7 +1,28 @@
-import { Component } from '@angular/core';
+import {
+ Component,
+ OnInit,
+} from '@angular/core';
+
+import { MessagingService } from 'jslib/abstractions/messaging.service';
+import { UserService } from 'jslib/abstractions/user.service';
@Component({
selector: 'app-tools',
templateUrl: 'tools.component.html',
})
-export class ToolsComponent { }
+export class ToolsComponent implements OnInit {
+ canAccessPremium = false;
+
+ constructor(private userService: UserService, private messagingService: MessagingService) { }
+
+ async ngOnInit() {
+ this.canAccessPremium = await this.userService.canAccessPremium();
+ }
+
+ async premiumRequired() {
+ if (!this.canAccessPremium) {
+ this.messagingService.send('premiumRequired');
+ return;
+ }
+ }
+}
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json
index de82ec2187..686e423c8a 100644
--- a/src/locales/en/messages.json
+++ b/src/locales/en/messages.json
@@ -2716,5 +2716,9 @@
"dontAskFingerprintAgain": {
"message": "Don't ask to verify fingerprint phrase again",
"description": "A 'fingerprint phrase' is a unique word phrase (similar to a passphrase) that a user can use to authenticate their public key with another user, for the purposes of sharing."
+ },
+ "free": {
+ "message": "Free",
+ "description": "Free, as in 'Free beer'"
}
}