mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Added support to lookup public keys online #89
This commit is contained in:
parent
bac6c2d332
commit
6c01db395d
4 changed files with 47 additions and 9 deletions
|
|
@ -4,11 +4,16 @@ import { OpenPGPUserStore } from 'Stores/User/OpenPGP';
|
|||
|
||||
import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
import { i18n } from 'Common/Translator';
|
||||
|
||||
export class OpenPgpImportPopupView extends AbstractViewPopup {
|
||||
constructor() {
|
||||
super('OpenPgpImport');
|
||||
|
||||
addObservablesTo(this, {
|
||||
search: '',
|
||||
|
||||
key: '',
|
||||
keyError: false,
|
||||
keyErrorMessage: '',
|
||||
|
|
@ -25,6 +30,21 @@ export class OpenPgpImportPopupView extends AbstractViewPopup {
|
|||
});
|
||||
}
|
||||
|
||||
searchPGP() {
|
||||
this.key(i18n('SUGGESTIONS/SEARCHING_DESC'));
|
||||
Remote.request('SearchPGPKey',
|
||||
(iError, oData) => {
|
||||
if (iError) {
|
||||
this.key(oData.ErrorMessage);
|
||||
} else {
|
||||
this.key(oData.Result);
|
||||
}
|
||||
}, {
|
||||
query: this.search()
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
submitForm() {
|
||||
let keyTrimmed = this.key().trim();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue