diff --git a/app/internal_packages/message-list/styles/message-list.less b/app/internal_packages/message-list/styles/message-list.less index fb4e3fa51..7347e0b92 100644 --- a/app/internal_packages/message-list/styles/message-list.less +++ b/app/internal_packages/message-list/styles/message-list.less @@ -102,6 +102,12 @@ body.platform-win32 { } } +.mode-splitVertical { + .message-nav-title { + display: none; + } +} + .hide-sidebar-button { font-size: @font-size-small; color: @text-color-subtle; diff --git a/app/internal_packages/preferences/lib/main.tsx b/app/internal_packages/preferences/lib/main.tsx index 100b26943..a1313685f 100644 --- a/app/internal_packages/preferences/lib/main.tsx +++ b/app/internal_packages/preferences/lib/main.tsx @@ -62,8 +62,9 @@ export function activate() { 'Preferences', {}, { - split: ['Preferences'], list: ['Preferences'], + split: ['Preferences'], + splitVertical: ['Preferences'], } ); diff --git a/app/internal_packages/preferences/lib/tabs/preferences-appearance.tsx b/app/internal_packages/preferences/lib/tabs/preferences-appearance.tsx index 78e0522e2..18877f5a7 100644 --- a/app/internal_packages/preferences/lib/tabs/preferences-appearance.tsx +++ b/app/internal_packages/preferences/lib/tabs/preferences-appearance.tsx @@ -139,7 +139,7 @@ class AppearanceModeSwitch extends React.Component< }; _renderModeOptions() { - return ['list', 'split'].map(mode => ( + return ['list', 'split', 'splitVertical'].map(mode => ( { + static displayName = 'ThreadListVertical'; + + render() { + + return ( + <> +
+ +
+
+ +
+ + ); + } + +} + +export default ThreadListVertical; \ No newline at end of file diff --git a/app/lang/de.json b/app/lang/de.json index d859b24ed..c9b65b56a 100644 --- a/app/lang/de.json +++ b/app/lang/de.json @@ -504,6 +504,8 @@ "Reading": "Lesen", "Reading Pane Off": "Lesefenster aus", "Reading Pane On": "Lesefenster ein", + "Horizontal Reading Pane": "Horizontales Lesefenster", + "Vertical Reading Pane": "Vertikales Lesefenster", "Rebuild": "Wiederherstellen", "Rebuild Cache...": "Cache neu erstellen...", "Recipient": "Empfänger:", @@ -771,6 +773,7 @@ "Twitter Handle": "Twitter Handle", "Twitter Profile Image": "Twitter Profilbild", "Two Panel": "Zwei Panel", + "Two Panel Vertical": "Zwei vertikale Panel", "Uhoh - that's a pro feature!": "Uhoh - das ist ein Pro-Feature!", "Unable to Add Account": "Account kann nicht hinzugefügt werden", "Unable to Start Local Server": "Der lokale Server konnte nicht gestartet werden", diff --git a/app/menus/darwin.js b/app/menus/darwin.js index 5d4af3e2b..e14a664c1 100644 --- a/app/menus/darwin.js +++ b/app/menus/darwin.js @@ -92,28 +92,42 @@ module.exports = { { label: localized('Reading Pane Off'), type: 'radio', - command: 'navigation:select-split-mode', - checked: true, - hideWhenDisabled: true, - }, - { - label: localized('Reading Pane On'), - type: 'radio', - command: 'navigation:select-split-mode', + command: 'navigation:list-mode-off', checked: false, hideWhenDisabled: true, }, { label: localized('Reading Pane Off'), type: 'radio', - command: 'navigation:select-list-mode', + command: 'navigation:list-mode-on', + checked: true, + hideWhenDisabled: true, + }, + { + label: localized('Horizontal Reading Pane'), + type: 'radio', + command: 'navigation:split-mode-off', checked: false, hideWhenDisabled: true, }, { - label: localized('Reading Pane On'), + label: localized('Horizontal Reading Pane'), type: 'radio', - command: 'navigation:select-list-mode', + command: 'navigation:split-mode-on', + checked: true, + hideWhenDisabled: true, + }, + { + label: localized('Vertical Reading Pane'), + type: 'radio', + command: 'navigation:splitVertical-mode-off', + checked: false, + hideWhenDisabled: true, + }, + { + label: localized('Vertical Reading Pane'), + type: 'radio', + command: 'navigation:splitVertical-mode-on', checked: true, hideWhenDisabled: true, }, diff --git a/app/menus/linux.js b/app/menus/linux.js index c151b6f72..6354903c4 100644 --- a/app/menus/linux.js +++ b/app/menus/linux.js @@ -64,28 +64,42 @@ module.exports = { { label: localized('Reading Pane Off'), type: 'radio', - command: 'navigation:select-split-mode', - checked: true, - hideWhenDisabled: true, - }, - { - label: localized('Reading Pane On'), - type: 'radio', - command: 'navigation:select-split-mode', + command: 'navigation:list-mode-off', checked: false, hideWhenDisabled: true, }, { label: localized('Reading Pane Off'), type: 'radio', - command: 'navigation:select-list-mode', + command: 'navigation:list-mode-on', + checked: true, + hideWhenDisabled: true, + }, + { + label: localized('Horizontal Reading Pane'), + type: 'radio', + command: 'navigation:split-mode-off', checked: false, hideWhenDisabled: true, }, { - label: localized('Reading Pane On'), + label: localized('Horizontal Reading Pane'), type: 'radio', - command: 'navigation:select-list-mode', + command: 'navigation:split-mode-on', + checked: true, + hideWhenDisabled: true, + }, + { + label: localized('Vertical Reading Pane'), + type: 'radio', + command: 'navigation:splitVertical-mode-off', + checked: false, + hideWhenDisabled: true, + }, + { + label: localized('Vertical Reading Pane'), + type: 'radio', + command: 'navigation:splitVertical-mode-on', checked: true, hideWhenDisabled: true, }, diff --git a/app/menus/win32.js b/app/menus/win32.js index ed547309d..82162af4b 100644 --- a/app/menus/win32.js +++ b/app/menus/win32.js @@ -39,28 +39,42 @@ module.exports = { { label: localized('Reading Pane Off'), type: 'radio', - command: 'navigation:select-split-mode', - checked: true, - hideWhenDisabled: true, - }, - { - label: localized('Reading Pane On'), - type: 'radio', - command: 'navigation:select-split-mode', + command: 'navigation:list-mode-off', checked: false, hideWhenDisabled: true, }, { label: localized('Reading Pane Off'), type: 'radio', - command: 'navigation:select-list-mode', + command: 'navigation:list-mode-on', + checked: true, + hideWhenDisabled: true, + }, + { + label: localized('Horizontal Reading Pane'), + type: 'radio', + command: 'navigation:split-mode-off', checked: false, hideWhenDisabled: true, }, { - label: localized('Reading Pane On'), + label: localized('Horizontal Reading Pane'), type: 'radio', - command: 'navigation:select-list-mode', + command: 'navigation:split-mode-on', + checked: true, + hideWhenDisabled: true, + }, + { + label: localized('Vertical Reading Pane'), + type: 'radio', + command: 'navigation:splitVertical-mode-off', + checked: false, + hideWhenDisabled: true, + }, + { + label: localized('Vertical Reading Pane'), + type: 'radio', + command: 'navigation:splitVertical-mode-on', checked: true, hideWhenDisabled: true, }, diff --git a/app/src/config-schema.ts b/app/src/config-schema.ts index fc253cf1a..3dc50be5c 100644 --- a/app/src/config-schema.ts +++ b/app/src/config-schema.ts @@ -30,7 +30,7 @@ export default { mode: { type: 'string', default: 'list', - enum: ['split', 'list'], + enum: ['split', 'list', 'splitVertical'], }, systemTray: { type: 'boolean', diff --git a/app/src/flux/stores/workspace-store.ts b/app/src/flux/stores/workspace-store.ts index 3fe0bda59..57abed19a 100644 --- a/app/src/flux/stores/workspace-store.ts +++ b/app/src/flux/stores/workspace-store.ts @@ -119,6 +119,7 @@ class WorkspaceStore extends MailspringStore { { list: ['RootSidebar', 'ThreadList'], split: ['RootSidebar', 'ThreadList', 'MessageList', 'MessageListSidebar'], + splitVertical: ['RootSidebar', 'ThreadListVertical', 'MessageListSidebar'], } ); this.defineSheet('Thread', {}, { list: ['MessageList', 'MessageListSidebar'] }); @@ -195,6 +196,7 @@ class WorkspaceStore extends MailspringStore { }; _onSelectLayoutMode = mode => { + if (mode === this._preferredLayoutMode) { return; } @@ -221,9 +223,9 @@ class WorkspaceStore extends MailspringStore { { 'core:pop-sheet': () => this.popSheet(), }, - this._preferredLayoutMode === 'list' - ? { 'navigation:select-split-mode': () => this._onSelectLayoutMode('split') } - : { 'navigation:select-list-mode': () => this._onSelectLayoutMode('list') } + this._preferredLayoutMode === 'list' ? { 'navigation:list-mode-on': () => this._onSelectLayoutMode('list') } : { 'navigation:list-mode-off': () => this._onSelectLayoutMode('list') }, + this._preferredLayoutMode === 'split' ? { 'navigation:split-mode-on': () => this._onSelectLayoutMode('split') } : { 'navigation:split-mode-off': () => this._onSelectLayoutMode('split') }, + this._preferredLayoutMode === 'splitVertical' ? { 'navigation:splitVertical-mode-on': () => this._onSelectLayoutMode('splitVertical') } : { 'navigation:splitVertical-mode-off': () => this._onSelectLayoutMode('splitVertical') }, ) ); } diff --git a/app/static/images/preferences/appearance/appearance-mode-splitVertical@2x.png b/app/static/images/preferences/appearance/appearance-mode-splitVertical@2x.png new file mode 100644 index 000000000..c8c0bbe24 Binary files /dev/null and b/app/static/images/preferences/appearance/appearance-mode-splitVertical@2x.png differ