mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
added keyboard shortcut for toggling the right pane, closes #4552
This commit is contained in:
parent
c6df25ece8
commit
6b58e59819
@ -8,10 +8,13 @@ export default class RightPaneContainer extends FlexContainer {
|
||||
this.id('right-pane');
|
||||
this.css('height', '100%');
|
||||
this.collapsible();
|
||||
|
||||
this.rightPaneHidden = false;
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return super.isEnabled()
|
||||
&& !this.rightPaneHidden
|
||||
&& this.children.length > 0
|
||||
&& !!this.children.find(ch => ch.isEnabled() && ch.canBeShown());
|
||||
}
|
||||
@ -44,4 +47,10 @@ export default class RightPaneContainer extends FlexContainer {
|
||||
splitService.setupRightPaneResizer();
|
||||
}
|
||||
}
|
||||
|
||||
toggleRightPaneEvent() {
|
||||
this.rightPaneHidden = !this.rightPaneHidden;
|
||||
|
||||
this.reEvaluateRightPaneVisibilityCommand();
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ const TPL = `
|
||||
<h5>Highlights List visibility</h5>
|
||||
|
||||
<p>You can hide the highlights widget per-note by adding a <code>#hideHighlightWidget</code> label.</p>
|
||||
|
||||
<p>You can configure a keyboard shortcut for quickly toggling the right pane (including Highlights) in the Options -> Shortcuts (name "toggleRightPane").</p>
|
||||
</div>`;
|
||||
|
||||
export default class HighlightsListOptions extends OptionsWidget {
|
||||
|
@ -11,6 +11,8 @@ const TPL = `
|
||||
</div>
|
||||
|
||||
<p>You can also use this option to effectively disable TOC by setting a very high number.</p>
|
||||
|
||||
<p>You can configure a keyboard shortcut for quickly toggling the right pane (including TOC) in the Options -> Shortcuts (name "toggleRightPane").</p>
|
||||
</div>`;
|
||||
|
||||
export default class TableOfContentsOptions extends OptionsWidget {
|
||||
|
@ -494,9 +494,16 @@ const DEFAULT_KEYBOARD_ACTIONS = [
|
||||
separator: "Other"
|
||||
},
|
||||
|
||||
{
|
||||
actionName: "toggleRightPane",
|
||||
defaultShortcuts: [],
|
||||
description: "Toggle the display of the right pane, which includes Table of Contents and Highlights",
|
||||
scope: "window"
|
||||
},
|
||||
{
|
||||
actionName: "printActiveNote",
|
||||
defaultShortcuts: [],
|
||||
description: "Print active note",
|
||||
scope: "window"
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user