Drop mail composer HTML/Plain Forced to prevent confusions like in #355

This commit is contained in:
the-djmaze 2022-04-30 00:43:38 +02:00
parent bde9835d5d
commit 435b590b3e
41 changed files with 9 additions and 90 deletions

View file

@ -105,9 +105,7 @@ export const MessagePriority = {
*/
export const EditorDefaultType = {
Html: 'Html',
Plain: 'Plain',
HtmlForced: 'HtmlForced',
PlainForced: 'PlainForced'
Plain: 'Plain'
};
/**

View file

@ -72,9 +72,7 @@ export class UserSettingsGeneral extends AbstractViewSettings {
translatorTrigger();
return [
{ id: EditorDefaultType.Html, name: i18n('SETTINGS_GENERAL/LABEL_EDITOR_HTML') },
{ id: EditorDefaultType.Plain, name: i18n('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN') },
{ id: EditorDefaultType.HtmlForced, name: i18n('SETTINGS_GENERAL/LABEL_EDITOR_HTML_FORCED') },
{ id: EditorDefaultType.PlainForced, name: i18n('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN_FORCED') }
{ id: EditorDefaultType.Plain, name: i18n('SETTINGS_GENERAL/LABEL_EDITOR_PLAIN') }
];
},

View file

@ -18,9 +18,7 @@ export const SettingsUserStore = new class {
self.editorDefaultType = ko.observable('Html').extend({
limitedList: [
EditorDefaultType.Html,
EditorDefaultType.Plain,
EditorDefaultType.HtmlForced,
EditorDefaultType.PlainForced
EditorDefaultType.Plain
]
});

View file

@ -165,7 +165,3 @@ Secondly, we can't rely on MUA's what to do with :empty
.rl-mobile #V-PopupsCompose {
min-height: calc(100% - 12px);
}
#V-PopupsCompose[data-wysiwyg*=Forced] #squire-toolgroup-mode {
display: none;
}

View file

@ -124,7 +124,7 @@ const
isPlainEditor = () => {
let type = SettingsUserStore.editorDefaultType();
return EditorDefaultType.Html !== type && EditorDefaultType.HtmlForced !== type;
return EditorDefaultType.Html !== type;
},
/**
@ -1079,8 +1079,8 @@ export class ComposePopupView extends AbstractViewPopup {
encrypted || editor.setHtml(sText);
if (encrypted
|| EditorDefaultType.PlainForced === SettingsUserStore.editorDefaultType()
|| (!message.isHtml() && EditorDefaultType.HtmlForced !== SettingsUserStore.editorDefaultType())
|| EditorDefaultType.Plain === SettingsUserStore.editorDefaultType()
|| !message.isHtml()
) {
editor.modePlain();
}