diff --git a/app/assets/javascripts/directives/views/accountMenu.ts b/app/assets/javascripts/directives/views/accountMenu.ts index 0e31abf5d..abd423ece 100644 --- a/app/assets/javascripts/directives/views/accountMenu.ts +++ b/app/assets/javascripts/directives/views/accountMenu.ts @@ -189,6 +189,10 @@ class AccountMenuCtrl extends PureViewCtrl { }); } + hasProtections() { + return this.application.hasAccount() || this.application.hasPasscode(); + } + private getProtectionsDisabledUntil(): string | null { const protectionExpiry = this.application.getProtectionSessionExpiryDate(); const now = new Date(); diff --git a/app/assets/templates/directives/account-menu.pug b/app/assets/templates/directives/account-menu.pug index ceb885d15..1941afa56 100644 --- a/app/assets/templates/directives/account-menu.pug +++ b/app/assets/templates/directives/account-menu.pug @@ -164,7 +164,7 @@ | {{self.encryptionStatusForNotes()}} p.sk-p | {{self.state.encryptionStatusString}} - .sk-panel-section + .sk-panel-section(ng-if="self.hasProtections()") .sk-panel-section-title Protections .sk-panel-section-subtitle.info(ng-if="self.state.protectionsDisabledUntil") | Protections are disabled until {{self.state.protectionsDisabledUntil}}