use parent folder instead of folder name
This commit is contained in:
parent
4cb27d2ec7
commit
fc90674374
2 changed files with 2 additions and 6 deletions
|
@ -38,7 +38,6 @@ import product from 'vs/platform/product/common/product';
|
|||
import { MarkdownString } from 'vs/base/common/htmlContent';
|
||||
import { isSingleFolderWorkspaceIdentifier, toWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { splitName } from 'vs/base/common/labels';
|
||||
import { STATUS_BAR_PROMINENT_ITEM_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_FOREGROUND } from 'vs/workbench/common/theme';
|
||||
|
||||
/*
|
||||
|
@ -113,9 +112,7 @@ export class WorkspaceTrustRequestHandler extends Disposable implements IWorkben
|
|||
const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceContextService.getWorkspace())!;
|
||||
const isSingleFolderWorkspace = isSingleFolderWorkspaceIdentifier(workspaceIdentifier);
|
||||
if (isSingleFolderWorkspaceIdentifier(workspaceIdentifier) && workspaceIdentifier.uri.scheme === Schemas.file) {
|
||||
const { parentPath } = splitName(workspaceIdentifier.uri.fsPath);
|
||||
const { name } = splitName(parentPath);
|
||||
checkboxText = localize('checkboxString', "I trust the author of all files in '{0}'", name);
|
||||
checkboxText = localize('checkboxString', "I trust the author of all files in the parent folder");
|
||||
}
|
||||
|
||||
// Show Workspace Trust Start Dialog
|
||||
|
|
|
@ -341,10 +341,9 @@ export class WorkspaceTrustEditor extends EditorPane {
|
|||
const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceService.getWorkspace());
|
||||
if (isSingleFolderWorkspaceIdentifier(workspaceIdentifier) && workspaceIdentifier.uri.scheme === Schemas.file) {
|
||||
const { parentPath } = splitName(workspaceIdentifier.uri.fsPath);
|
||||
const { name } = splitName(parentPath);
|
||||
if (parentPath) {
|
||||
trustChoiceWithMenu.menu.push({
|
||||
label: localize('trustParentButton', "Trust All in '{0}'", name),
|
||||
label: localize('trustParentButton', "Trust All in Parent Folder"),
|
||||
run: () => {
|
||||
trustUris([URI.file(parentPath)]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue