fix: hide protections paragraph when no account or passcode exist

This commit is contained in:
Baptiste Grob
2021-02-15 16:28:36 +01:00
parent 523feff6c8
commit aa34bfc0c6
2 changed files with 5 additions and 1 deletions

View File

@@ -189,6 +189,10 @@ class AccountMenuCtrl extends PureViewCtrl<unknown, AccountMenuState> {
});
}
hasProtections() {
return this.application.hasAccount() || this.application.hasPasscode();
}
private getProtectionsDisabledUntil(): string | null {
const protectionExpiry = this.application.getProtectionSessionExpiryDate();
const now = new Date();

View File

@@ -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}}