add toggleLeftPane command/shortcut, closes #2225

This commit is contained in:
zadam
2021-10-12 19:29:42 +02:00
parent 23e34e8c02
commit e2c37a6f8c
4 changed files with 34 additions and 12 deletions

View File

@@ -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();