mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Cleanup and better rename settings screens to match template names
This commit is contained in:
parent
30116c183f
commit
4dd58f7c36
83 changed files with 267 additions and 323 deletions
|
|
@ -7,7 +7,17 @@ import { AbstractViewSettings } from 'Knoin/AbstractViews';
|
|||
|
||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
|
||||
export class SecurityUserSettings extends AbstractViewSettings {
|
||||
import { GnuPGUserStore } from 'Stores/User/GnuPG';
|
||||
import { OpenPGPUserStore } from 'Stores/User/OpenPGP';
|
||||
|
||||
import Remote from 'Remote/User/Fetch';
|
||||
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import { OpenPgpImportPopupView } from 'View/Popup/OpenPgpImport';
|
||||
import { OpenPgpGeneratePopupView } from 'View/Popup/OpenPgpGenerate';
|
||||
|
||||
export class UserSettingsSecurity extends AbstractViewSettings {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
|
|
@ -33,5 +43,35 @@ export class SecurityUserSettings extends AbstractViewSettings {
|
|||
if (this.capaAutoLogout) {
|
||||
this.addSetting('AutoLogout');
|
||||
}
|
||||
|
||||
this.gnupgPublicKeys = GnuPGUserStore.publicKeys;
|
||||
this.gnupgPrivateKeys = GnuPGUserStore.privateKeys;
|
||||
|
||||
this.openpgpkeysPublic = OpenPGPUserStore.publicKeys;
|
||||
this.openpgpkeysPrivate = OpenPGPUserStore.privateKeys;
|
||||
|
||||
this.canOpenPGP = SettingsCapa('OpenPGP');
|
||||
this.canGnuPG = GnuPGUserStore.isSupported();
|
||||
this.canMailvelope = !!window.mailvelope;
|
||||
|
||||
this.allowDraftAutosave = SettingsUserStore.allowDraftAutosave;
|
||||
|
||||
this.allowDraftAutosave.subscribe(value => Remote.saveSetting('AllowDraftAutosave', value))
|
||||
}
|
||||
|
||||
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*/);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue