Improve Settings -> OpenPGP to show available features

This commit is contained in:
the-djmaze 2022-01-24 16:47:53 +01:00
parent ce971de919
commit 8635771537
3 changed files with 16 additions and 7 deletions

View file

@ -11,6 +11,9 @@ import { AddOpenPgpKeyPopupView } from 'View/Popup/AddOpenPgpKey';
import { NewOpenPgpKeyPopupView } from 'View/Popup/NewOpenPgpKey';
import { ViewOpenPgpKeyPopupView } from 'View/Popup/ViewOpenPgpKey';
import { Capa } from 'Common/Enums';
import { Settings } from 'Common/Globals';
export class OpenPgpUserSettings /*extends AbstractViewSettings*/ {
constructor() {
this.gnupgkeys = PgpUserStore.gnupgKeys;
@ -19,8 +22,10 @@ export class OpenPgpUserSettings /*extends AbstractViewSettings*/ {
this.openpgpkeysPrivate = PgpUserStore.openpgpPrivateKeys;
this.openPgpKeyForDeletion = ko.observable(null).deleteAccessHelper();
this.canOpenPGP = !!PgpUserStore.openpgpKeyring;
// this.canOpenPGP = Settings.capa(Capa.OpenPGP);
// this.canOpenPGP = !!PgpUserStore.openpgpKeyring;
this.canOpenPGP = Settings.capa(Capa.OpenPGP);
// this.canGnuPG = !!PgpUserStore.gnupgKeyring;
this.canGnuPG = Settings.capa(Capa.GnuPG);
this.canMailvelope = !!window.mailvelope;
this.allowDraftAutosave = SettingsUserStore.allowDraftAutosave;