mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
User -> Settings -> General: add more compose window defaults:
* Request a read receipt * Request a delivery receipt * Sign * Encrypt
This commit is contained in:
parent
246d73c070
commit
629f75d4e8
6 changed files with 80 additions and 30 deletions
|
|
@ -30,11 +30,6 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
||||||
|
|
||||||
this.language = LanguageStore.language;
|
this.language = LanguageStore.language;
|
||||||
this.languages = LanguageStore.languages;
|
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.soundNotification = SMAudio.notifications;
|
||||||
this.notificationSound = ko.observable(SettingsGet('NotificationSound'));
|
this.notificationSound = ko.observable(SettingsGet('NotificationSound'));
|
||||||
|
|
@ -43,14 +38,14 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
||||||
this.desktopNotification = NotificationUserStore.enabled;
|
this.desktopNotification = NotificationUserStore.enabled;
|
||||||
this.isDesktopNotificationAllowed = NotificationUserStore.allowed;
|
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.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.allowLanguagesOnSettings = !!SettingsGet('AllowLanguagesOnSettings');
|
||||||
|
|
||||||
this.languageTrigger = ko.observable(SaveSettingsStep.Idle);
|
this.languageTrigger = ko.observable(SaveSettingsStep.Idle);
|
||||||
|
|
@ -94,6 +89,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
|
||||||
this.addSetting('Layout', () => MessagelistUserStore([]));
|
this.addSetting('Layout', () => MessagelistUserStore([]));
|
||||||
|
|
||||||
this.addSettings(['ViewHTML', 'ShowImages', 'HideDeleted', 'UseCheckboxesInList', 'ReplySameFolder',
|
this.addSettings(['ViewHTML', 'ShowImages', 'HideDeleted', 'UseCheckboxesInList', 'ReplySameFolder',
|
||||||
|
'requestReadReceipt', 'requestDsn', 'pgpSign', 'pgpEncrypt',
|
||||||
'DesktopNotifications', 'SoundNotification']);
|
'DesktopNotifications', 'SoundNotification']);
|
||||||
|
|
||||||
const fReloadLanguageHelper = (saveSettingsStep) => () => {
|
const fReloadLanguageHelper = (saveSettingsStep) => () => {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,12 @@ export const SettingsUserStore = new class {
|
||||||
replySameFolder: 0,
|
replySameFolder: 0,
|
||||||
hideUnsubscribed: 0,
|
hideUnsubscribed: 0,
|
||||||
hideDeleted: 1,
|
hideDeleted: 1,
|
||||||
autoLogout: 0
|
autoLogout: 0,
|
||||||
|
|
||||||
|
requestReadReceipt: 0,
|
||||||
|
requestDsn: 0,
|
||||||
|
pgpSign: 0,
|
||||||
|
pgpEncrypt: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
self.init();
|
self.init();
|
||||||
|
|
@ -85,5 +90,10 @@ export const SettingsUserStore = new class {
|
||||||
|
|
||||||
self.hideUnsubscribed(SettingsGet('HideUnsubscribed'));
|
self.hideUnsubscribed(SettingsGet('HideUnsubscribed'));
|
||||||
self.hideDeleted(SettingsGet('HideDeleted'));
|
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.replyTo('');
|
||||||
this.subject('');
|
this.subject('');
|
||||||
|
|
||||||
this.requestDsn(false);
|
this.requestDsn(SettingsUserStore.requestDsn());
|
||||||
this.requestReadReceipt(false);
|
this.requestReadReceipt(SettingsUserStore.requestReadReceipt());
|
||||||
this.markAsImportant(false);
|
this.markAsImportant(false);
|
||||||
|
|
||||||
this.bodyArea();
|
this.bodyArea();
|
||||||
|
|
@ -1485,8 +1485,8 @@ export class ComposePopupView extends AbstractViewPopup {
|
||||||
this.showBcc(false);
|
this.showBcc(false);
|
||||||
this.showReplyTo(false);
|
this.showReplyTo(false);
|
||||||
|
|
||||||
this.pgpSign(false);
|
this.pgpSign(SettingsUserStore.pgpSign());
|
||||||
this.pgpEncrypt(false);
|
this.pgpEncrypt(SettingsUserStore.pgpEncrypt());
|
||||||
|
|
||||||
this.attachments([]);
|
this.attachments([]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -851,6 +851,11 @@ class Actions
|
||||||
}
|
}
|
||||||
|
|
||||||
$aResult['EditorDefaultType'] = \str_replace('Forced', '', $oSettings->GetConf('EditorDefaultType', $aResult['EditorDefaultType']));
|
$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['ViewHTML'] = (bool)$oSettings->GetConf('ViewHTML', $aResult['ViewHTML']);
|
||||||
$aResult['ShowImages'] = (bool)$oSettings->GetConf('ShowImages', $aResult['ShowImages']);
|
$aResult['ShowImages'] = (bool)$oSettings->GetConf('ShowImages', $aResult['ShowImages']);
|
||||||
$aResult['RemoveColors'] = (bool)$oSettings->GetConf('RemoveColors', $aResult['RemoveColors']);
|
$aResult['RemoveColors'] = (bool)$oSettings->GetConf('RemoveColors', $aResult['RemoveColors']);
|
||||||
|
|
|
||||||
|
|
@ -330,6 +330,11 @@ trait User
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->setSettingsFromParams($oSettings, 'EditorDefaultType', 'string');
|
$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, 'ViewHTML', 'bool');
|
||||||
$this->setSettingsFromParams($oSettings, 'ShowImages', 'bool');
|
$this->setSettingsFromParams($oSettings, 'ShowImages', 'bool');
|
||||||
$this->setSettingsFromParams($oSettings, 'RemoveColors', 'bool');
|
$this->setSettingsFromParams($oSettings, 'RemoveColors', 'bool');
|
||||||
|
|
|
||||||
|
|
@ -24,19 +24,6 @@
|
||||||
}
|
}
|
||||||
}"></div>
|
}"></div>
|
||||||
</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">
|
<div class="control-group">
|
||||||
<label data-i18n="SETTINGS_GENERAL/LABEL_MESSAGE_PER_PAGE"></label>
|
<label data-i18n="SETTINGS_GENERAL/LABEL_MESSAGE_PER_PAGE"></label>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -78,6 +65,53 @@
|
||||||
</div>
|
</div>
|
||||||
</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="legend" data-i18n="SHORTCUTS_HELP/TAB_MESSAGE_VIEW"></div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label data-i18n="SETTINGS_GENERAL/LABEL_MARK_MESSAGE_READ_AFTER"></label>
|
<label data-i18n="SETTINGS_GENERAL/LABEL_MARK_MESSAGE_READ_AFTER"></label>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue