fix: hide protections paragraph when no account or passcode exist
This commit is contained in:
@@ -189,6 +189,10 @@ class AccountMenuCtrl extends PureViewCtrl<unknown, AccountMenuState> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hasProtections() {
|
||||||
|
return this.application.hasAccount() || this.application.hasPasscode();
|
||||||
|
}
|
||||||
|
|
||||||
private getProtectionsDisabledUntil(): string | null {
|
private getProtectionsDisabledUntil(): string | null {
|
||||||
const protectionExpiry = this.application.getProtectionSessionExpiryDate();
|
const protectionExpiry = this.application.getProtectionSessionExpiryDate();
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
|||||||
@@ -164,7 +164,7 @@
|
|||||||
| {{self.encryptionStatusForNotes()}}
|
| {{self.encryptionStatusForNotes()}}
|
||||||
p.sk-p
|
p.sk-p
|
||||||
| {{self.state.encryptionStatusString}}
|
| {{self.state.encryptionStatusString}}
|
||||||
.sk-panel-section
|
.sk-panel-section(ng-if="self.hasProtections()")
|
||||||
.sk-panel-section-title Protections
|
.sk-panel-section-title Protections
|
||||||
.sk-panel-section-subtitle.info(ng-if="self.state.protectionsDisabledUntil")
|
.sk-panel-section-subtitle.info(ng-if="self.state.protectionsDisabledUntil")
|
||||||
| Protections are disabled until {{self.state.protectionsDisabledUntil}}
|
| Protections are disabled until {{self.state.protectionsDisabledUntil}}
|
||||||
|
|||||||
Reference in New Issue
Block a user