mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-29 07:16:07 +00:00
User -> Settings -> General: add more compose window defaults:
* Request a read receipt * Request a delivery receipt * Sign * Encrypt
This commit is contained in:
@@ -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) => () => {
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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([]);
|
||||
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -24,19 +24,6 @@
|
||||
}
|
||||
}"></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label data-i18n="SETTINGS_GENERAL/LABEL_EDITOR"></label>
|
||||
<div data-bind="component: {
|
||||
name: 'Select',
|
||||
params: {
|
||||
options: editorDefaultTypes,
|
||||
value: editorDefaultType,
|
||||
trigger: editorDefaultTypeTrigger,
|
||||
optionsText: 'name',
|
||||
optionsValue: 'id'
|
||||
}
|
||||
}"></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label data-i18n="SETTINGS_GENERAL/LABEL_MESSAGE_PER_PAGE"></label>
|
||||
<div>
|
||||
@@ -78,6 +65,53 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="legend" data-i18n="SHORTCUTS_HELP/TAB_COMPOSE"></div>
|
||||
<div class="control-group">
|
||||
<label data-i18n="SETTINGS_GENERAL/LABEL_EDITOR"></label>
|
||||
<div data-bind="component: {
|
||||
name: 'Select',
|
||||
params: {
|
||||
options: editorDefaultTypes,
|
||||
value: editorDefaultType,
|
||||
trigger: editorDefaultTypeTrigger,
|
||||
optionsText: 'name',
|
||||
optionsValue: 'id'
|
||||
}
|
||||
}"></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div>
|
||||
<div data-bind="component: {
|
||||
name: 'Checkbox',
|
||||
params: {
|
||||
label: 'COMPOSE/BUTTON_REQUEST_READ_RECEIPT',
|
||||
value: requestReadReceipt
|
||||
}
|
||||
}"></div>
|
||||
<div data-bind="component: {
|
||||
name: 'Checkbox',
|
||||
params: {
|
||||
label: 'COMPOSE/BUTTON_REQUEST_DSN',
|
||||
value: requestDsn
|
||||
}
|
||||
}"></div>
|
||||
<div data-bind="component: {
|
||||
name: 'Checkbox',
|
||||
params: {
|
||||
label: 'OPENPGP/LABEL_SIGN',
|
||||
value: pgpSign
|
||||
}
|
||||
}"></div>
|
||||
<div data-bind="component: {
|
||||
name: 'Checkbox',
|
||||
params: {
|
||||
label: 'OPENPGP/LABEL_ENCRYPT',
|
||||
value: pgpEncrypt
|
||||
}
|
||||
}"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="legend" data-i18n="SHORTCUTS_HELP/TAB_MESSAGE_VIEW"></div>
|
||||
<div class="control-group">
|
||||
<label data-i18n="SETTINGS_GENERAL/LABEL_MARK_MESSAGE_READ_AFTER"></label>
|
||||
|
||||
Reference in New Issue
Block a user