- add sync actions to account dropdown

- remove sign in actions from account dropdown
This commit is contained in:
Sandeep Somavarapu
2020-04-15 19:32:59 +02:00
parent 02369c7dc2
commit 545c747f0b
2 changed files with 13 additions and 29 deletions

View File

@@ -120,35 +120,8 @@ export class MainThreadAuthenticationProvider extends Disposable {
quickPick.show();
}
private createSignInMenu(hasSessions: boolean): void {
this._signInMenuDisposables.push(CommandsRegistry.registerCommand({
id: `signIn${this.id}`,
handler: (accessor, args) => {
this.login();
},
}));
this._signInMenuItem = {
group: '2_providers',
command: {
id: `signIn${this.id}`,
title: hasSessions
? nls.localize('addAnotherAccount', "Sign in to another {0} account", this.displayName)
: nls.localize('addAccount', "Sign in to {0}", this.displayName)
},
order: 3
};
this._signInMenuDisposables.push(MenuRegistry.appendMenuItem(MenuId.AccountsContext, this._signInMenuItem));
}
private async registerCommandsAndContextMenuItems(): Promise<void> {
const sessions = await this._proxy.$getSessions(this.id);
if (!sessions.length || (sessions.length && this.supportsMultipleAccounts)) {
this.createSignInMenu(!!sessions.length);
}
sessions.forEach(session => this.registerSession(session));
}
@@ -250,8 +223,6 @@ export class MainThreadAuthenticationProvider extends Disposable {
if (this._signInMenuItem) {
this._signInMenuItem.command.title = nls.localize('addAccount', "Sign in to {0}", this.displayName);
} else {
this.createSignInMenu(false);
}
}
}