mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
OpenPGP.js now stores keys in localStorage
Renamed all deleteAccess to askDelete
This commit is contained in:
parent
9ab72e7a34
commit
0da681f074
21 changed files with 57 additions and 51 deletions
|
|
@ -22,8 +22,8 @@ export class AccountsUserSettings /*extends AbstractViewSettings*/ {
|
|||
this.identities = IdentityUserStore;
|
||||
this.mainEmail = SettingsGet('MainEmail');
|
||||
|
||||
this.accountForDeletion = ko.observable(null).deleteAccessHelper();
|
||||
this.identityForDeletion = ko.observable(null).deleteAccessHelper();
|
||||
this.accountForDeletion = ko.observable(null).askDeleteHelper();
|
||||
this.identityForDeletion = ko.observable(null).askDeleteHelper();
|
||||
}
|
||||
|
||||
addNewAccount() {
|
||||
|
|
@ -49,7 +49,7 @@ export class AccountsUserSettings /*extends AbstractViewSettings*/ {
|
|||
* @returns {void}
|
||||
*/
|
||||
deleteAccount(accountToRemove) {
|
||||
if (accountToRemove && accountToRemove.deleteAccess()) {
|
||||
if (accountToRemove && accountToRemove.askDelete()) {
|
||||
this.accountForDeletion(null);
|
||||
if (accountToRemove) {
|
||||
this.accounts.remove((account) => accountToRemove === account);
|
||||
|
|
@ -73,7 +73,7 @@ export class AccountsUserSettings /*extends AbstractViewSettings*/ {
|
|||
* @returns {void}
|
||||
*/
|
||||
deleteIdentity(identityToRemove) {
|
||||
if (identityToRemove && identityToRemove.deleteAccess()) {
|
||||
if (identityToRemove && identityToRemove.askDelete()) {
|
||||
this.identityForDeletion(null);
|
||||
|
||||
if (identityToRemove) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export class FiltersUserSettings /*extends AbstractViewSettings*/ {
|
|||
serverErrorDesc: ''
|
||||
});
|
||||
|
||||
this.scriptForDeletion = ko.observable(null).deleteAccessHelper();
|
||||
this.scriptForDeletion = ko.observable(null).askDeleteHelper();
|
||||
}
|
||||
|
||||
setError(text) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import { showScreenPopup } from 'Knoin/Knoin';
|
|||
import { FolderCreatePopupView } from 'View/Popup/FolderCreate';
|
||||
import { FolderSystemPopupView } from 'View/Popup/FolderSystem';
|
||||
|
||||
const folderForDeletion = ko.observable(null).deleteAccessHelper();
|
||||
const folderForDeletion = ko.observable(null).askDeleteHelper();
|
||||
|
||||
export class FoldersUserSettings /*extends AbstractViewSettings*/ {
|
||||
constructor() {
|
||||
|
|
@ -124,7 +124,7 @@ export class FoldersUserSettings /*extends AbstractViewSettings*/ {
|
|||
deleteFolder(folderToRemove) {
|
||||
if (folderToRemove
|
||||
&& folderToRemove.canBeDeleted()
|
||||
&& folderToRemove.deleteAccess()
|
||||
&& folderToRemove.askDelete()
|
||||
) {
|
||||
if (0 < folderToRemove.privateMessageCountAll()) {
|
||||
// FolderUserStore.folderListError(getNotification(Notification.CantDeleteNonEmptyFolder));
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { PgpUserStore } from 'Stores/User/Pgp';
|
||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
|
||||
|
|
@ -19,7 +17,6 @@ export class OpenPgpUserSettings /*extends AbstractViewSettings*/ {
|
|||
|
||||
this.openpgpkeysPublic = PgpUserStore.openpgpPublicKeys;
|
||||
this.openpgpkeysPrivate = PgpUserStore.openpgpPrivateKeys;
|
||||
this.openPgpKeyForDeletion = ko.observable(null).deleteAccessHelper();
|
||||
|
||||
this.canOpenPGP = Settings.capa(Capa.OpenPGP);
|
||||
this.canGnuPG = Settings.capa(Capa.GnuPG);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue