MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / constructor

Method constructor

src/controller/import.controller.js:19–40  ·  view source on GitHub ↗
(port)

Source from the content-addressed store, hash-verified

17
18export default class ImportController extends SubController {
19 constructor(port) {
20 super(port);
21 if (!port) {
22 this.mainType = 'importKeyDialog';
23 this.id = getUUID();
24 }
25 this.armored = '';
26 this.popupPromise = null;
27 this.importPopup = null;
28 this.keyringId = '';
29 this.keyring = null;
30 this.key = null;
31 this.keyDetails = null;
32 this.importError = false;
33 this.invalidated = false;
34 // register event handlers
35 this.on('imframe-armored-key', this.onArmoredKey);
36 this.on('key-import-dialog-init', () => this.emit('key-details', {key: this.keyDetails, invalidated: this.invalidated, rotation: this.rotation}));
37 this.on('key-import-dialog-ok', this.onImportOk);
38 this.on('key-import-dialog-cancel', this.handleCancel);
39 this.on('key-import-user-input', msg => uiLog.push(msg.source, msg.type));
40 }
41
42 onArmoredKey({data}) {
43 const slotId = getUUID();

Callers

nothing calls this directly

Calls 4

getUUIDFunction · 0.90
onMethod · 0.45
emitMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected