diff --git a/dev/Settings/User/General.js b/dev/Settings/User/General.js index f67d8c0b1..6e873fc89 100644 --- a/dev/Settings/User/General.js +++ b/dev/Settings/User/General.js @@ -30,11 +30,6 @@ export class UserSettingsGeneral extends AbstractViewSettings { this.language = LanguageStore.language; this.languages = LanguageStore.languages; - this.messageReadDelay = SettingsUserStore.messageReadDelay; - this.messagesPerPage = SettingsUserStore.messagesPerPage; - - this.editorDefaultType = SettingsUserStore.editorDefaultType; - this.layout = SettingsUserStore.layout; this.soundNotification = SMAudio.notifications; this.notificationSound = ko.observable(SettingsGet('NotificationSound')); @@ -43,14 +38,14 @@ export class UserSettingsGeneral extends AbstractViewSettings { this.desktopNotification = NotificationUserStore.enabled; this.isDesktopNotificationAllowed = NotificationUserStore.allowed; - this.viewHTML = SettingsUserStore.viewHTML; - this.showImages = SettingsUserStore.showImages; - this.removeColors = SettingsUserStore.removeColors; - this.hideDeleted = SettingsUserStore.hideDeleted; - this.useCheckboxesInList = SettingsUserStore.useCheckboxesInList; this.threadsAllowed = AppUserStore.threadsAllowed; - this.useThreads = SettingsUserStore.useThreads; - this.replySameFolder = SettingsUserStore.replySameFolder; + + ['layout', 'messageReadDelay', 'messagesPerPage', + 'editorDefaultType', 'requestReadReceipt', 'requestDsn', 'pgpSign', 'pgpEncrypt', + 'viewHTML', 'showImages', 'removeColors', 'hideDeleted', + 'useCheckboxesInList', 'useThreads', 'replySameFolder' + ].forEach(name => this[name] = SettingsUserStore[name]); + this.allowLanguagesOnSettings = !!SettingsGet('AllowLanguagesOnSettings'); this.languageTrigger = ko.observable(SaveSettingsStep.Idle); @@ -94,6 +89,7 @@ export class UserSettingsGeneral extends AbstractViewSettings { this.addSetting('Layout', () => MessagelistUserStore([])); this.addSettings(['ViewHTML', 'ShowImages', 'HideDeleted', 'UseCheckboxesInList', 'ReplySameFolder', + 'requestReadReceipt', 'requestDsn', 'pgpSign', 'pgpEncrypt', 'DesktopNotifications', 'SoundNotification']); const fReloadLanguageHelper = (saveSettingsStep) => () => { diff --git a/dev/Stores/User/Settings.js b/dev/Stores/User/Settings.js index 07f792a27..e1bf0f880 100644 --- a/dev/Stores/User/Settings.js +++ b/dev/Stores/User/Settings.js @@ -36,7 +36,12 @@ export const SettingsUserStore = new class { replySameFolder: 0, hideUnsubscribed: 0, hideDeleted: 1, - autoLogout: 0 + autoLogout: 0, + + requestReadReceipt: 0, + requestDsn: 0, + pgpSign: 0, + pgpEncrypt: 0 }); self.init(); @@ -85,5 +90,10 @@ export const SettingsUserStore = new class { self.hideUnsubscribed(SettingsGet('HideUnsubscribed')); self.hideDeleted(SettingsGet('HideDeleted')); + + self.requestReadReceipt(SettingsGet('requestReadReceipt')); + self.requestDsn(SettingsGet('requestDsn')); + self.pgpSign(SettingsGet('pgpSign')); + self.pgpEncrypt(SettingsGet('pgpEncrypt')); } }; diff --git a/dev/View/Popup/Compose.js b/dev/View/Popup/Compose.js index 75e252571..1d26dc0f4 100644 --- a/dev/View/Popup/Compose.js +++ b/dev/View/Popup/Compose.js @@ -1463,8 +1463,8 @@ export class ComposePopupView extends AbstractViewPopup { this.replyTo(''); this.subject(''); - this.requestDsn(false); - this.requestReadReceipt(false); + this.requestDsn(SettingsUserStore.requestDsn()); + this.requestReadReceipt(SettingsUserStore.requestReadReceipt()); this.markAsImportant(false); this.bodyArea(); @@ -1485,8 +1485,8 @@ export class ComposePopupView extends AbstractViewPopup { this.showBcc(false); this.showReplyTo(false); - this.pgpSign(false); - this.pgpEncrypt(false); + this.pgpSign(SettingsUserStore.pgpSign()); + this.pgpEncrypt(SettingsUserStore.pgpEncrypt()); this.attachments([]); diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php index cfdd63fb8..14baba876 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -851,6 +851,11 @@ class Actions } $aResult['EditorDefaultType'] = \str_replace('Forced', '', $oSettings->GetConf('EditorDefaultType', $aResult['EditorDefaultType'])); + $aResult['requestReadReceipt'] = (bool) $oSettings->GetConf('requestReadReceipt', false); + $aResult['requestDsn'] = (bool) $oSettings->GetConf('requestDsn', false); + $aResult['pgpSign'] = (bool) $oSettings->GetConf('pgpSign', false); + $aResult['pgpEncrypt'] = (bool) $oSettings->GetConf('pgpEncrypt', false); + $aResult['ViewHTML'] = (bool)$oSettings->GetConf('ViewHTML', $aResult['ViewHTML']); $aResult['ShowImages'] = (bool)$oSettings->GetConf('ShowImages', $aResult['ShowImages']); $aResult['RemoveColors'] = (bool)$oSettings->GetConf('RemoveColors', $aResult['RemoveColors']); diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/User.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/User.php index 1d2765b12..af914c3d1 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/User.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/User.php @@ -330,6 +330,11 @@ trait User }); $this->setSettingsFromParams($oSettings, 'EditorDefaultType', 'string'); + $this->setSettingsFromParams($oSettings, 'requestReadReceipt', 'bool'); + $this->setSettingsFromParams($oSettings, 'requestDsn', 'bool'); + $this->setSettingsFromParams($oSettings, 'pgpSign', 'bool'); + $this->setSettingsFromParams($oSettings, 'pgpEncrypt', 'bool'); + $this->setSettingsFromParams($oSettings, 'ViewHTML', 'bool'); $this->setSettingsFromParams($oSettings, 'ShowImages', 'bool'); $this->setSettingsFromParams($oSettings, 'RemoveColors', 'bool'); diff --git a/snappymail/v/0.0.0/app/templates/Views/User/SettingsGeneral.html b/snappymail/v/0.0.0/app/templates/Views/User/SettingsGeneral.html index f62cb91fa..23a92143e 100644 --- a/snappymail/v/0.0.0/app/templates/Views/User/SettingsGeneral.html +++ b/snappymail/v/0.0.0/app/templates/Views/User/SettingsGeneral.html @@ -24,19 +24,6 @@ } }"> -