Skip to content

Commit

Permalink
Added HideDocs to touchbar. Fixed issue altair-graphql#1717
Browse files Browse the repository at this point in the history
  • Loading branch information
adrohan19 authored Apr 21, 2023
1 parent e2f4920 commit ab6d59d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/altair-electron/src/app/touchbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,20 @@ export class TouchbarManager {
click: () => this.actionManager.reloadDocs(),
});

const showDocsButton = new TouchBarButton({
const showDocsButton = new TouchBarButton({
label: 'Show Docs',
click: () => this.actionManager.showDocs(),
enabled: true,
click: () => {this.actionManager.showDocs();
showDocsButton.enabled=false;
hideDocsButton.enabled=true;}
});

const hideDocsButton = new TouchBarButton({
label: 'Hide Docs',
enabled: false,
click: () => {this.actionManager.showDocs();
showDocsButton.enabled=true;
hideDocsButton.enabled=false}
});

const spacer = new TouchBarSpacer({
Expand All @@ -34,6 +45,7 @@ export class TouchbarManager {
spacer,
reloadDocsButton,
showDocsButton,
hideDocsButton,
],
});

Expand Down

0 comments on commit ab6d59d

Please sign in to comment.