Show dialog when there are no trusted extensions for account, fixes #96359

This commit is contained in:
Rachel Macfarlane
2020-11-04 15:43:54 -08:00
parent 5463322d19
commit 0f623956c2

View File

@@ -98,9 +98,15 @@ export class MainThreadAuthenticationProvider extends Disposable {
}
public manageTrustedExtensions(accountName: string) {
const allowedExtensions = readAllowedExtensions(this.storageService, this.id, accountName);
if (!allowedExtensions.length) {
this.dialogService.show(Severity.Info, nls.localize('noTrustedExtensions', "This account has not been used by any extensions."), []);
return;
}
const quickPick = this.quickInputService.createQuickPick<{ label: string, description: string, extension: AllowedExtension }>();
quickPick.canSelectMany = true;
const allowedExtensions = readAllowedExtensions(this.storageService, this.id, accountName);
const usages = readAccountUsages(this.storageService, this.id, accountName);
const items = allowedExtensions.map(extension => {
const usage = usages.find(usage => extension.id === usage.extensionId);