mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-09 00:08:18 +08:00
0da681f074
Renamed all deleteAccess to askDelete
45 lines
1.4 KiB
JavaScript
45 lines
1.4 KiB
JavaScript
import { PgpUserStore } from 'Stores/User/Pgp';
|
|
import { SettingsUserStore } from 'Stores/User/Settings';
|
|
|
|
import Remote from 'Remote/User/Fetch';
|
|
|
|
import { showScreenPopup } from 'Knoin/Knoin';
|
|
|
|
import { OpenPgpImportPopupView } from 'View/Popup/OpenPgpImport';
|
|
import { OpenPgpGeneratePopupView } from 'View/Popup/OpenPgpGenerate';
|
|
|
|
import { Capa } from 'Common/Enums';
|
|
import { Settings } from 'Common/Globals';
|
|
|
|
export class OpenPgpUserSettings /*extends AbstractViewSettings*/ {
|
|
constructor() {
|
|
this.gnupgkeys = PgpUserStore.gnupgKeys;
|
|
|
|
this.openpgpkeysPublic = PgpUserStore.openpgpPublicKeys;
|
|
this.openpgpkeysPrivate = PgpUserStore.openpgpPrivateKeys;
|
|
|
|
this.canOpenPGP = Settings.capa(Capa.OpenPGP);
|
|
this.canGnuPG = Settings.capa(Capa.GnuPG);
|
|
this.canMailvelope = !!window.mailvelope;
|
|
|
|
this.allowDraftAutosave = SettingsUserStore.allowDraftAutosave;
|
|
|
|
this.allowDraftAutosave.subscribe(value => Remote.saveSetting('AllowDraftAutosave', value ? 1 : 0))
|
|
}
|
|
|
|
addOpenPgpKey() {
|
|
showScreenPopup(OpenPgpImportPopupView);
|
|
}
|
|
|
|
generateOpenPgpKey() {
|
|
showScreenPopup(OpenPgpGeneratePopupView);
|
|
}
|
|
|
|
onBuild() {
|
|
/**
|
|
* Create an iframe to display the Mailvelope keyring settings.
|
|
* The iframe will be injected into the container identified by selector.
|
|
*/
|
|
window.mailvelope && mailvelope.createSettingsContainer('#mailvelope-settings'/*[, keyring], options*/);
|
|
}
|
|
}
|