#89 Improved handling of OpenPGP.js stored keys

This commit is contained in:
the-djmaze 2022-01-27 20:54:27 +01:00
parent ff7e41ad08
commit 9ab72e7a34
6 changed files with 73 additions and 151 deletions

View file

@ -9,7 +9,6 @@ import { showScreenPopup } from 'Knoin/Knoin';
import { OpenPgpImportPopupView } from 'View/Popup/OpenPgpImport';
import { OpenPgpGeneratePopupView } from 'View/Popup/OpenPgpGenerate';
import { ViewOpenPgpKeyPopupView } from 'View/Popup/ViewOpenPgpKey';
import { Capa } from 'Common/Enums';
import { Settings } from 'Common/Globals';
@ -39,12 +38,6 @@ export class OpenPgpUserSettings /*extends AbstractViewSettings*/ {
showScreenPopup(OpenPgpGeneratePopupView);
}
viewOpenPgpKey(openPgpKey) {
if (openPgpKey) {
showScreenPopup(ViewOpenPgpKeyPopupView, [openPgpKey]);
}
}
onBuild() {
/**
* Create an iframe to display the Mailvelope keyring settings.
@ -52,15 +45,4 @@ export class OpenPgpUserSettings /*extends AbstractViewSettings*/ {
*/
window.mailvelope && mailvelope.createSettingsContainer('#mailvelope-settings'/*[, keyring], options*/);
}
/**
* @param {OpenPgpKeyModel} openPgpKeyToRemove
* @returns {void}
*/
deleteOpenPgpKey(openPgpKeyToRemove) {
if (openPgpKeyToRemove && openPgpKeyToRemove.deleteAccess()) {
this.openPgpKeyForDeletion(null);
PgpUserStore.deleteKey(openPgpKeyToRemove);
}
}
}