User -> Settings -> General: add more compose window defaults:

* Request a read receipt
* Request a delivery receipt
* Sign
* Encrypt
This commit is contained in:
the-djmaze 2022-08-09 15:34:55 +02:00
parent 246d73c070
commit 629f75d4e8
6 changed files with 80 additions and 30 deletions

View file

@ -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) => () => {

View file

@ -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'));
}
};

View file

@ -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([]);