Remove duplicate extensions from browse filter (#15907)

* Remove duplicate extensions from browse filter

* Update placeholder
This commit is contained in:
Charles Gagnon
2021-06-24 23:55:53 -07:00
committed by GitHub
parent 3eef3f2a0b
commit 1caef2dc6e
2 changed files with 2 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ export const CloneParentDirectoryNotExistError = (location: string): string => {
export const Project = localize('dataworkspace.project', "Project");
export const Workspace = localize('dataworkspace.workspace', "Workspace");
export const LocationSelectorTitle = localize('dataworkspace.locationSelectorTitle', "Location");
export const ProjectFilePlaceholder = localize('dataworkspace.projectFilePlaceholder', "Select project (.sqlproj) file");
export const ProjectFilePlaceholder = localize('dataworkspace.projectFilePlaceholder', "Select project file");
export const WorkspacePlaceholder = localize('dataworkspace.workspacePlaceholder', "Select workspace ({0}) file", WorkspaceFileExtension);
export const ProjectAlreadyOpened = (path: string): string => { return localize('dataworkspace.projectAlreadyOpened', "Project '{0}' is already opened.", path); };
export const Local = localize('dataworksapce.local', 'Local');

View File

@@ -374,7 +374,7 @@ export class OpenExistingDialog extends DialogBase {
public async projectBrowse(): Promise<void> {
const filters: { [name: string]: string[] } = {};
const projectTypes = await this.workspaceService.getAllProjectTypes();
filters[constants.AllProjectTypes] = projectTypes.map(type => type.projectFileExtension);
filters[constants.AllProjectTypes] = [...new Set(projectTypes.map(type => type.projectFileExtension))];
projectTypes.forEach(type => {
filters[type.displayName] = [type.projectFileExtension];
});