diff --git a/src/public/app/layouts/desktop_extra_window_layout.js b/src/public/app/layouts/desktop_extra_window_layout.js index 15c46327c..dc4466502 100644 --- a/src/public/app/layouts/desktop_extra_window_layout.js +++ b/src/public/app/layouts/desktop_extra_window_layout.js @@ -30,7 +30,7 @@ export default class DesktopExtraWindowLayout { .child(new TitleBarButtonsWidget())) .child(new FlexContainer('row') .collapsible() - .child(new FlexContainer('column').id('center-pane') + .child(new FlexContainer('column').id('center-pane').css('flex-grow', '1') .child(new FlexContainer('row').class('title-row') .cssBlock('.title-row > * { margin: 5px; }') .child(new NoteTitleWidget()) diff --git a/src/public/app/services/tab_manager.js b/src/public/app/services/tab_manager.js index 5e04981c4..a69cd5551 100644 --- a/src/public/app/services/tab_manager.js +++ b/src/public/app/services/tab_manager.js @@ -322,6 +322,14 @@ export default class TabManager extends Component { } } + moveTabToNewWindowCommand({tabId}) { + const notePath = this.getTabContextById(tabId).notePath; + + this.removeTab(tabId); + + appContext.openInNewWindow(notePath); + } + async hoistedNoteChangedEvent({hoistedNoteId}) { if (hoistedNoteId === 'root') { return; diff --git a/src/public/app/services/tree_context_menu.js b/src/public/app/services/tree_context_menu.js index cb0d4158e..948ee53bd 100644 --- a/src/public/app/services/tree_context_menu.js +++ b/src/public/app/services/tree_context_menu.js @@ -56,7 +56,8 @@ class TreeContextMenu { const insertNoteAfterEnabled = isNotRoot && !isHoisted && parentNotSearch; return [ - { title: 'Open in new tab', command: "openInTab", uiIcon: "empty", enabled: noSelectedNotes }, + { title: 'Open in a new tab Ctrl+Click', command: "openInTab", uiIcon: "empty", enabled: noSelectedNotes }, + { title: 'Open in a new window', command: "openInWindow", uiIcon: "empty", enabled: noSelectedNotes }, { title: 'Insert note after ', command: "insertNoteAfter", uiIcon: "plus", items: insertNoteAfterEnabled ? this.getNoteTypeItems("insertNoteAfter") : null, enabled: insertNoteAfterEnabled && noSelectedNotes }, @@ -111,6 +112,9 @@ class TreeContextMenu { if (command === 'openInTab') { appContext.tabManager.openTabWithNote(notePath); } + else if (command === 'openInWindow') { + appContext.openInNewWindow(notePath); + } else if (command === "insertNoteAfter") { const parentNoteId = this.node.data.parentNoteId; const isProtected = await treeService.getParentProtectedStatus(this.node); diff --git a/src/public/app/widgets/tab_row.js b/src/public/app/widgets/tab_row.js index b60a159a5..7f896560b 100644 --- a/src/public/app/widgets/tab_row.js +++ b/src/public/app/widgets/tab_row.js @@ -258,8 +258,9 @@ export default class TabRowWidget extends BasicWidget { x: e.pageX, y: e.pageY, items: [ + {title: "Move this tab to a new window", command: "moveTabToNewWindow", uiIcon: "empty"}, {title: "Close all tabs", command: "removeAllTabs", uiIcon: "empty"}, - {title: "Close all tabs except for this", command: "removeAllTabsExceptForThis", uiIcon: "empty"} + {title: "Close all tabs except for this", command: "removeAllTabsExceptForThis", uiIcon: "empty"}, ], selectMenuItemHandler: ({command}) => { this.triggerCommand(command, {tabId}); diff --git a/src/public/app/widgets/type_widgets/editable_text.js b/src/public/app/widgets/type_widgets/editable_text.js index 635ea7b31..38b85a583 100644 --- a/src/public/app/widgets/type_widgets/editable_text.js +++ b/src/public/app/widgets/type_widgets/editable_text.js @@ -56,6 +56,7 @@ const TPL = ` overflow: auto; height: 100%; font-family: var(--detail-text-font-family); + padding-left: 12px; } .note-detail-text-editor {