Skip to content

Commit

Permalink
Show sign out command for settings sync in gear menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachel Macfarlane committed Nov 12, 2019
1 parent 8f60641 commit 9b70b18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vs/workbench/contrib/userDataSync/browser/userDataSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,15 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
MenuRegistry.appendMenuItem(MenuId.CommandPalette, signInMenuItem);

const signOutMenuItem: IMenuItem = {
group: '5_sync',
command: {
id: 'workbench.userData.actions.logout',
title: localize('sign out', "Sign Out")
},
when: ContextKeyExpr.and(CONTEXT_AUTH_TOKEN_STATE.isEqualTo(AuthTokenStatus.Active)),
};
CommandsRegistry.registerCommand(signOutMenuItem.command.id, () => this.signOut());
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, signOutMenuItem);
MenuRegistry.appendMenuItem(MenuId.CommandPalette, signOutMenuItem);

const startSyncMenuItem: IMenuItem = {
Expand Down

0 comments on commit 9b70b18

Please sign in to comment.