mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Disable Mailvelope "sign" message as it can't choose which key
This commit is contained in:
parent
c4ffcc708a
commit
398152be52
6 changed files with 22 additions and 17 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Capa } from 'Common/Enums';
|
||||
import { doc, createElement, Settings } from 'Common/Globals';
|
||||
import { doc, createElement, SettingsCapa, SettingsGet } from 'Common/Globals';
|
||||
import { staticLink } from 'Common/Links';
|
||||
|
||||
//import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
|
@ -17,7 +17,7 @@ export const PgpUserStore = new class {
|
|||
}
|
||||
|
||||
init() {
|
||||
if (Settings.capa(Capa.OpenPGP) && window.crypto && crypto.getRandomValues) {
|
||||
if (SettingsCapa(Capa.OpenPGP) && window.crypto && crypto.getRandomValues) {
|
||||
const script = createElement('script', {src:staticLink('js/min/openpgp.min.js')});
|
||||
script.onload = () => this.loadKeyrings();
|
||||
script.onerror = () => {
|
||||
|
|
@ -31,11 +31,12 @@ export const PgpUserStore = new class {
|
|||
}
|
||||
|
||||
loadKeyrings(identifier) {
|
||||
identifier = identifier || SettingsGet('Email');
|
||||
if (window.mailvelope) {
|
||||
var fn = keyring => {
|
||||
this.mailvelopeKeyring = keyring;
|
||||
console.log('mailvelope ready');
|
||||
};
|
||||
const fn = keyring => {
|
||||
this.mailvelopeKeyring = keyring;
|
||||
console.log('mailvelope ready');
|
||||
};
|
||||
mailvelope.getKeyring().then(fn, err => {
|
||||
if (identifier) {
|
||||
// attempt to create a new keyring for this app/user
|
||||
|
|
@ -52,11 +53,11 @@ export const PgpUserStore = new class {
|
|||
}
|
||||
|
||||
if (OpenPGPUserStore.isSupported()) {
|
||||
OpenPGPUserStore.loadKeyrings(identifier);
|
||||
OpenPGPUserStore.loadKeyrings();
|
||||
}
|
||||
|
||||
if (Settings.capa(Capa.GnuPG)) {
|
||||
GnuPGUserStore.loadKeyrings(identifier);
|
||||
if (SettingsCapa(Capa.GnuPG)) {
|
||||
GnuPGUserStore.loadKeyrings();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue