mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Added option to prefer HTML to plain text view.
This commit is contained in:
parent
8343e76d5f
commit
7680372eda
41 changed files with 107 additions and 18 deletions
|
|
@ -37,6 +37,7 @@ export class GeneralUserSettings /*extends AbstractViewSettings*/ {
|
|||
this.enableDesktopNotification = NotificationUserStore.enableDesktopNotification;
|
||||
this.isDesktopNotificationAllowed = NotificationUserStore.isDesktopNotificationAllowed;
|
||||
|
||||
this.viewHTML = SettingsUserStore.viewHTML;
|
||||
this.showImages = SettingsUserStore.showImages;
|
||||
this.removeColors = SettingsUserStore.removeColors;
|
||||
this.useCheckboxesInList = SettingsUserStore.useCheckboxesInList;
|
||||
|
|
@ -111,6 +112,7 @@ export class GeneralUserSettings /*extends AbstractViewSettings*/ {
|
|||
messagesPerPage: value => Remote.saveSetting('MPP', value,
|
||||
settingsSaveHelperSimpleFunction(this.mppTrigger, this)),
|
||||
|
||||
viewHTML: value => Remote.saveSetting('ViewHTML', value ? 1 : 0),
|
||||
showImages: value => Remote.saveSetting('ShowImages', value ? 1 : 0),
|
||||
|
||||
removeColors: value => {
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ export const MessageUserStore = new class {
|
|||
message.body = body;
|
||||
message.fetchDataFromDom();
|
||||
} else {
|
||||
let isHtml = !!json.Html,
|
||||
let isHtml = (SettingsUserStore.viewHTML() || !json.Plain) && !!json.Html,
|
||||
resultHtml = '';
|
||||
if (isHtml) {
|
||||
resultHtml = json.Html.toString().replace(/font-size:\s*[0-9]px/g,'font-size:11px');
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ export const SettingsUserStore = new class {
|
|||
self.messageReadDelay = ko.observable(5).extend({ debounce: 999 });
|
||||
|
||||
addObservablesTo(self, {
|
||||
viewHTML: 1,
|
||||
showImages: 0,
|
||||
removeColors: 0,
|
||||
useCheckboxesInList: 1,
|
||||
|
|
@ -74,6 +75,7 @@ export const SettingsUserStore = new class {
|
|||
self.messageReadDelay(pInt(SettingsGet('MessageReadDelay')));
|
||||
self.autoLogout(pInt(SettingsGet('AutoLogout')));
|
||||
|
||||
self.viewHTML(SettingsGet('ViewHTML'));
|
||||
self.showImages(SettingsGet('ShowImages'));
|
||||
self.removeColors(SettingsGet('RemoveColors'));
|
||||
self.useCheckboxesInList(SettingsGet('UseCheckboxesInList'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue