mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Added button to import keys from server into OpenPGP.js #89
This commit is contained in:
parent
6c01db395d
commit
f8002151be
41 changed files with 76 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ import { showScreenPopup } from 'Knoin/Knoin';
|
|||
import { OpenPgpImportPopupView } from 'View/Popup/OpenPgpImport';
|
||||
import { OpenPgpGeneratePopupView } from 'View/Popup/OpenPgpGenerate';
|
||||
|
||||
//import Remote from 'Remote/User/Fetch';
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
export class UserSettingsSecurity extends AbstractViewSettings {
|
||||
constructor() {
|
||||
|
|
@ -56,6 +56,16 @@ export class UserSettingsSecurity extends AbstractViewSettings {
|
|||
showScreenPopup(OpenPgpGeneratePopupView);
|
||||
}
|
||||
|
||||
importToOpenPGP() {
|
||||
OpenPGPUserStore.isSupported() && Remote.request('GetPGPKeys',
|
||||
(iError, oData) => {
|
||||
if (!iError && oData.Result) {
|
||||
oData.Result.forEach(key => OpenPGPUserStore.importKey(key));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
onBuild() {
|
||||
/**
|
||||
* Create an iframe to display the Mailvelope keyring settings.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue