Move browse to the bottom of the list of folders

This commit is contained in:
Eric Jizba 2018-01-03 09:58:06 -08:00
Родитель 5c0332b814
Коммит b3154f8ba2
3 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -12,9 +12,8 @@ export async function selectWorkspaceFolder(ui: IUserInterface, placeholder: str
const browse: string = ':browse';
let folder: PickWithData<string> | undefined;
if (vscode.workspace.workspaceFolders) {
let folderPicks: PickWithData<string>[] = [new PickWithData(browse, localize('azFunc.browse', '$(file-directory) Browse...'))];
folderPicks = folderPicks.concat(vscode.workspace.workspaceFolders.map((f: vscode.WorkspaceFolder) => new PickWithData('', f.uri.fsPath)));
const folderPicks: PickWithData<string>[] = vscode.workspace.workspaceFolders.map((f: vscode.WorkspaceFolder) => new PickWithData('', f.uri.fsPath));
folderPicks.push(new PickWithData(browse, localize('azFunc.browse', '$(file-directory) Browse...')));
folder = await ui.showQuickPick<string>(folderPicks, placeholder);
}

Просмотреть файл

@ -169,7 +169,7 @@ async function testCreateFunction(templateName: string, ...inputs: (string | und
inputs.unshift(templateName); // Select the function template
inputs.unshift(testFolder); // Select the test func app folder
if (vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) {
inputs.unshift(undefined); // If the test environment has an open workspace, select the 'Browse...' option
inputs.unshift('$(file-directory) Browse...'); // If the test environment has an open workspace, select the 'Browse...' option
}
const ui: TestUI = new TestUI(inputs);

Просмотреть файл

@ -64,7 +64,7 @@ async function testCreateNewProject(language: string, ...inputs: (string | undef
inputs.unshift(language); // Specify the function name
inputs.unshift(testFolderPath); // Select the test func app folder
if (vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) {
inputs.unshift(undefined); // If the test environment has an open workspace, select the 'Browse...' option
inputs.unshift('$(file-directory) Browse...'); // If the test environment has an open workspace, select the 'Browse...' option
}
const ui: TestUI = new TestUI(inputs);