mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 07:45:51 +01:00
add toggleLeftPane command/shortcut, closes #2225
This commit is contained in:
@@ -11,26 +11,18 @@ export default class LeftPaneToggleWidget extends ButtonWidget {
|
||||
: "bx-chevrons-right";
|
||||
|
||||
this.settings.title = isLeftPaneVisible
|
||||
? "Hide sidebar."
|
||||
: "Open sidebar.";
|
||||
? "Hide panel."
|
||||
: "Open panel.";
|
||||
|
||||
this.settings.command = isLeftPaneVisible
|
||||
? "hideSidebar"
|
||||
: "showSidebar";
|
||||
? "hideLeftPane"
|
||||
: "showLeftPane";
|
||||
|
||||
super.refreshIcon();
|
||||
|
||||
splitService.setupLeftPaneResizer(isLeftPaneVisible);
|
||||
}
|
||||
|
||||
hideSidebarCommand() {
|
||||
options.save(`leftPaneVisible`, "false");
|
||||
}
|
||||
|
||||
showSidebarCommand() {
|
||||
options.save(`leftPaneVisible`, "true");
|
||||
}
|
||||
|
||||
entitiesReloadedEvent({loadResults}) {
|
||||
if (loadResults.isOptionReloaded("leftPaneVisible")) {
|
||||
this.refreshIcon();
|
||||
|
||||
Reference in New Issue
Block a user