@codingame/monaco-vscode-workspace-trust-service-override 10.0.1 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-workspace-trust-service-override",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@10.0
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@10.1.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -61,12 +61,12 @@ import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/
|
|
|
61
61
|
import { basename, dirname } from 'vscode/vscode/vs/base/common/resources';
|
|
62
62
|
|
|
63
63
|
var TrustedUriActionsColumnRenderer_1, TrustedUriPathColumnRenderer_1, TrustedUriHostColumnRenderer_1, WorkspaceTrustEditor_1;
|
|
64
|
-
const shieldIcon = registerIcon('workspace-trust-banner', Codicon.shield, ( localize(
|
|
65
|
-
const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, ( localize(
|
|
66
|
-
const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, ( localize(
|
|
67
|
-
const folderPickerIcon = registerIcon('workspace-trust-editor-folder-picker', Codicon.folder, ( localize(
|
|
68
|
-
const editIcon = registerIcon('workspace-trust-editor-edit-folder', Codicon.edit, ( localize(
|
|
69
|
-
const removeIcon = registerIcon('workspace-trust-editor-remove-folder', Codicon.close, ( localize(
|
|
64
|
+
const shieldIcon = registerIcon('workspace-trust-banner', Codicon.shield, ( localize(7616, 'Icon for workspace trust ion the banner.')));
|
|
65
|
+
const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, ( localize(7617, 'Icon for the checkmark in the workspace trust editor.')));
|
|
66
|
+
const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, ( localize(7618, 'Icon for the cross in the workspace trust editor.')));
|
|
67
|
+
const folderPickerIcon = registerIcon('workspace-trust-editor-folder-picker', Codicon.folder, ( localize(7619, 'Icon for the pick folder icon in the workspace trust editor.')));
|
|
68
|
+
const editIcon = registerIcon('workspace-trust-editor-edit-folder', Codicon.edit, ( localize(7620, 'Icon for the edit folder icon in the workspace trust editor.')));
|
|
69
|
+
const removeIcon = registerIcon('workspace-trust-editor-remove-folder', Codicon.close, ( localize(7621, 'Icon for the remove folder icon in the workspace trust editor.')));
|
|
70
70
|
let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposable {
|
|
71
71
|
constructor(container, instantiationService, workspaceService, workspaceTrustManagementService, uriService, labelService, fileDialogService) {
|
|
72
72
|
super();
|
|
@@ -90,14 +90,14 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
90
90
|
const addButtonBarElement = container.appendChild($('.trusted-uris-button-bar'));
|
|
91
91
|
this.table = this.instantiationService.createInstance(WorkbenchTable, 'WorkspaceTrust', tableElement, ( (new TrustedUriTableVirtualDelegate())), [
|
|
92
92
|
{
|
|
93
|
-
label: ( localize(
|
|
93
|
+
label: ( localize(7622, "Host")),
|
|
94
94
|
tooltip: '',
|
|
95
95
|
weight: 1,
|
|
96
96
|
templateId: TrustedUriHostColumnRenderer.TEMPLATE_ID,
|
|
97
97
|
project(row) { return row; }
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
|
-
label: ( localize(
|
|
100
|
+
label: ( localize(7623, "Path")),
|
|
101
101
|
tooltip: '',
|
|
102
102
|
weight: 8,
|
|
103
103
|
templateId: TrustedUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -125,16 +125,16 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
125
125
|
getAriaLabel: (item) => {
|
|
126
126
|
const hostLabel = getHostLabel(this.labelService, item);
|
|
127
127
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
128
|
-
return ( localize(
|
|
128
|
+
return ( localize(7624, "{0}, trusted", this.labelService.getUriLabel(item.uri)));
|
|
129
129
|
}
|
|
130
130
|
return ( localize(
|
|
131
|
-
|
|
131
|
+
7625,
|
|
132
132
|
"{0} on {1}, trusted",
|
|
133
133
|
this.labelService.getUriLabel(item.uri),
|
|
134
134
|
hostLabel
|
|
135
135
|
));
|
|
136
136
|
},
|
|
137
|
-
getWidgetAriaLabel: () => ( localize(
|
|
137
|
+
getWidgetAriaLabel: () => ( localize(7626, "Trusted Folders & Workspaces"))
|
|
138
138
|
},
|
|
139
139
|
identityProvider: {
|
|
140
140
|
getId(element) {
|
|
@@ -150,16 +150,16 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
150
150
|
}
|
|
151
151
|
}));
|
|
152
152
|
const buttonBar = this._register(( (new ButtonBar(addButtonBarElement))));
|
|
153
|
-
const addButton = this._register(buttonBar.addButton({ title: ( localize(
|
|
154
|
-
addButton.label = ( localize(
|
|
153
|
+
const addButton = this._register(buttonBar.addButton({ title: ( localize(7627, "Add Folder")), ...defaultButtonStyles }));
|
|
154
|
+
addButton.label = ( localize(7627, "Add Folder"));
|
|
155
155
|
this._register(addButton.onDidClick(async () => {
|
|
156
156
|
const uri = await this.fileDialogService.showOpenDialog({
|
|
157
157
|
canSelectFiles: false,
|
|
158
158
|
canSelectFolders: true,
|
|
159
159
|
canSelectMany: false,
|
|
160
160
|
defaultUri: this.currentWorkspaceUri,
|
|
161
|
-
openLabel: ( localize(
|
|
162
|
-
title: ( localize(
|
|
161
|
+
openLabel: ( localize(7628, "Trust Folder")),
|
|
162
|
+
title: ( localize(7629, "Select Folder To Trust"))
|
|
163
163
|
});
|
|
164
164
|
if (uri) {
|
|
165
165
|
this.workspaceTrustManagementService.setUrisTrust(uri, true);
|
|
@@ -240,10 +240,10 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
240
240
|
this.container.classList.toggle('empty', entries.length === 0);
|
|
241
241
|
this.descriptionElement.innerText = entries.length ?
|
|
242
242
|
( localize(
|
|
243
|
-
|
|
243
|
+
7630,
|
|
244
244
|
"You trust the following folders, their subfolders, and workspace files."
|
|
245
245
|
)) :
|
|
246
|
-
( localize(
|
|
246
|
+
( localize(7631, "You haven't trusted any folders or workspace files yet."));
|
|
247
247
|
this.table.splice(0, Number.POSITIVE_INFINITY, this.trustedUriEntries);
|
|
248
248
|
this.layout();
|
|
249
249
|
}
|
|
@@ -257,7 +257,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
257
257
|
return {
|
|
258
258
|
type: 2 ,
|
|
259
259
|
content: ( localize(
|
|
260
|
-
|
|
260
|
+
7632,
|
|
261
261
|
"You will trust all repositories on {0}.",
|
|
262
262
|
getHostLabel(this.labelService, item)
|
|
263
263
|
))
|
|
@@ -267,7 +267,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
267
267
|
return {
|
|
268
268
|
type: 2 ,
|
|
269
269
|
content: ( localize(
|
|
270
|
-
|
|
270
|
+
7633,
|
|
271
271
|
"You will trust all repositories and forks under '{0}' on {1}.",
|
|
272
272
|
segments[0],
|
|
273
273
|
getHostLabel(this.labelService, item)
|
|
@@ -277,7 +277,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
277
277
|
if (segments.length > 2) {
|
|
278
278
|
return {
|
|
279
279
|
type: 3 ,
|
|
280
|
-
content: ( localize(
|
|
280
|
+
content: ( localize(7634, "You cannot trust individual folders within a repository.", path))
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
283
|
}
|
|
@@ -318,8 +318,8 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
318
318
|
canSelectFolders: true,
|
|
319
319
|
canSelectMany: false,
|
|
320
320
|
defaultUri: item.uri,
|
|
321
|
-
openLabel: ( localize(
|
|
322
|
-
title: ( localize(
|
|
321
|
+
openLabel: ( localize(7628, "Trust Folder")),
|
|
322
|
+
title: ( localize(7629, "Select Folder To Trust"))
|
|
323
323
|
});
|
|
324
324
|
if (uri) {
|
|
325
325
|
this.acceptEdit(item, uri[0]);
|
|
@@ -386,7 +386,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
386
386
|
class: ThemeIcon.asClassName(editIcon),
|
|
387
387
|
enabled: true,
|
|
388
388
|
id: 'editTrustedUri',
|
|
389
|
-
tooltip: ( localize(
|
|
389
|
+
tooltip: ( localize(7635, "Edit Path")),
|
|
390
390
|
run: () => {
|
|
391
391
|
this.table.edit(item, false);
|
|
392
392
|
}
|
|
@@ -398,7 +398,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
398
398
|
class: ThemeIcon.asClassName(folderPickerIcon),
|
|
399
399
|
enabled: true,
|
|
400
400
|
id: 'pickerTrustedUri',
|
|
401
|
-
tooltip: ( localize(
|
|
401
|
+
tooltip: ( localize(7636, "Open File Picker")),
|
|
402
402
|
run: () => {
|
|
403
403
|
this.table.edit(item, true);
|
|
404
404
|
}
|
|
@@ -410,7 +410,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
410
410
|
class: ThemeIcon.asClassName(removeIcon),
|
|
411
411
|
enabled: true,
|
|
412
412
|
id: 'deleteTrustedUri',
|
|
413
|
-
tooltip: ( localize(
|
|
413
|
+
tooltip: ( localize(7637, "Delete Path")),
|
|
414
414
|
run: async () => {
|
|
415
415
|
await this.table.delete(item);
|
|
416
416
|
}
|
|
@@ -527,7 +527,7 @@ TrustedUriPathColumnRenderer = TrustedUriPathColumnRenderer_1 = ( (__decorate([
|
|
|
527
527
|
( (__param(1, IContextViewService)))
|
|
528
528
|
], TrustedUriPathColumnRenderer)));
|
|
529
529
|
function getHostLabel(labelService, item) {
|
|
530
|
-
return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localize(
|
|
530
|
+
return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localize(7638, "Local"));
|
|
531
531
|
}
|
|
532
532
|
let TrustedUriHostColumnRenderer = class TrustedUriHostColumnRenderer {
|
|
533
533
|
static { TrustedUriHostColumnRenderer_1 = this; }
|
|
@@ -660,18 +660,18 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
660
660
|
getHeaderTitleText(trusted) {
|
|
661
661
|
if (trusted) {
|
|
662
662
|
if (this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
|
|
663
|
-
return ( localize(
|
|
663
|
+
return ( localize(7639, "This window is trusted"));
|
|
664
664
|
}
|
|
665
665
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
666
666
|
case 1 :
|
|
667
|
-
return ( localize(
|
|
667
|
+
return ( localize(7640, "You trust this window"));
|
|
668
668
|
case 2 :
|
|
669
|
-
return ( localize(
|
|
669
|
+
return ( localize(7641, "You trust this folder"));
|
|
670
670
|
case 3 :
|
|
671
|
-
return ( localize(
|
|
671
|
+
return ( localize(7642, "You trust this workspace"));
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
return ( localize(
|
|
674
|
+
return ( localize(7643, "You are in Restricted Mode"));
|
|
675
675
|
}
|
|
676
676
|
getHeaderTitleIconClassNames(trusted) {
|
|
677
677
|
return ThemeIcon.asClassNameArray(shieldIcon);
|
|
@@ -681,37 +681,37 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
681
681
|
let subTitle = '';
|
|
682
682
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
683
683
|
case 1 : {
|
|
684
|
-
title = trusted ? ( localize(
|
|
684
|
+
title = trusted ? ( localize(7644, "In a Trusted Window")) : ( localize(7645, "In Restricted Mode"));
|
|
685
685
|
subTitle = trusted ? ( localize(
|
|
686
|
-
|
|
686
|
+
7646,
|
|
687
687
|
"You trust the authors of the files in the current window. All features are enabled:"
|
|
688
688
|
)) :
|
|
689
689
|
( localize(
|
|
690
|
-
|
|
690
|
+
7647,
|
|
691
691
|
"You do not trust the authors of the files in the current window. The following features are disabled:"
|
|
692
692
|
));
|
|
693
693
|
break;
|
|
694
694
|
}
|
|
695
695
|
case 2 : {
|
|
696
|
-
title = trusted ? ( localize(
|
|
696
|
+
title = trusted ? ( localize(7648, "In a Trusted Folder")) : ( localize(7645, "In Restricted Mode"));
|
|
697
697
|
subTitle = trusted ? ( localize(
|
|
698
|
-
|
|
698
|
+
7649,
|
|
699
699
|
"You trust the authors of the files in the current folder. All features are enabled:"
|
|
700
700
|
)) :
|
|
701
701
|
( localize(
|
|
702
|
-
|
|
702
|
+
7650,
|
|
703
703
|
"You do not trust the authors of the files in the current folder. The following features are disabled:"
|
|
704
704
|
));
|
|
705
705
|
break;
|
|
706
706
|
}
|
|
707
707
|
case 3 : {
|
|
708
|
-
title = trusted ? ( localize(
|
|
708
|
+
title = trusted ? ( localize(7651, "In a Trusted Workspace")) : ( localize(7645, "In Restricted Mode"));
|
|
709
709
|
subTitle = trusted ? ( localize(
|
|
710
|
-
|
|
710
|
+
7652,
|
|
711
711
|
"You trust the authors of the files in the current workspace. All features are enabled:"
|
|
712
712
|
)) :
|
|
713
713
|
( localize(
|
|
714
|
-
|
|
714
|
+
7653,
|
|
715
715
|
"You do not trust the authors of the files in the current workspace. The following features are disabled:"
|
|
716
716
|
));
|
|
717
717
|
break;
|
|
@@ -735,17 +735,17 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
735
735
|
const headerDescriptionText = append(this.headerDescription, $('div'));
|
|
736
736
|
headerDescriptionText.innerText = isWorkspaceTrusted ?
|
|
737
737
|
( localize(
|
|
738
|
-
|
|
738
|
+
7654,
|
|
739
739
|
"All features are enabled because trust has been granted to the workspace."
|
|
740
740
|
)) :
|
|
741
741
|
( localize(
|
|
742
|
-
|
|
742
|
+
7655,
|
|
743
743
|
"{0} is in a restricted mode intended for safe code browsing.",
|
|
744
744
|
this.productService.nameShort
|
|
745
745
|
));
|
|
746
746
|
const headerDescriptionActions = append(this.headerDescription, $('div'));
|
|
747
747
|
const headerDescriptionActionsText = ( localize(
|
|
748
|
-
|
|
748
|
+
7656,
|
|
749
749
|
"[Configure your settings]({0}) or [learn more](https://aka.ms/vscode-workspace-trust).",
|
|
750
750
|
`command:workbench.trust.configure`
|
|
751
751
|
));
|
|
@@ -758,7 +758,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
this.headerContainer.className = this.getHeaderContainerClass(isWorkspaceTrusted);
|
|
761
|
-
this.rootElement.setAttribute('aria-label', `${( localize(
|
|
761
|
+
this.rootElement.setAttribute('aria-label', `${( localize(7657, "Manage Workspace Trust"))}: ${this.headerContainer.innerText}`);
|
|
762
762
|
const restrictedSettings = this.configurationService.restrictedSettings;
|
|
763
763
|
const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
|
|
764
764
|
const settingsRequiringTrustedWorkspaceCount = restrictedSettings.default.filter(key => {
|
|
@@ -823,7 +823,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
823
823
|
createConfigurationElement(parent) {
|
|
824
824
|
this.configurationContainer = append(parent, $('.workspace-trust-settings', { tabIndex: '0' }));
|
|
825
825
|
const configurationTitle = append(this.configurationContainer, $('.workspace-trusted-folders-title'));
|
|
826
|
-
configurationTitle.innerText = ( localize(
|
|
826
|
+
configurationTitle.innerText = ( localize(7626, "Trusted Folders & Workspaces"));
|
|
827
827
|
this.workspaceTrustedUrisTable = this._register(this.instantiationService.createInstance(WorkspaceTrustedUrisTable, this.configurationContainer));
|
|
828
828
|
}
|
|
829
829
|
createAffectedFeaturesElement(parent) {
|
|
@@ -838,41 +838,41 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
838
838
|
this.renderLimitationsHeaderElement(this.trustedContainer, trustedTitle, trustedSubTitle);
|
|
839
839
|
const trustedContainerItems = this.workspaceService.getWorkbenchState() === 1 ?
|
|
840
840
|
[
|
|
841
|
-
( localize(
|
|
842
|
-
( localize(
|
|
843
|
-
( localize(
|
|
841
|
+
( localize(7658, "Tasks are allowed to run")),
|
|
842
|
+
( localize(7659, "Debugging is enabled")),
|
|
843
|
+
( localize(7660, "All enabled extensions are activated"))
|
|
844
844
|
] :
|
|
845
845
|
[
|
|
846
|
-
( localize(
|
|
847
|
-
( localize(
|
|
848
|
-
( localize(
|
|
849
|
-
( localize(
|
|
846
|
+
( localize(7658, "Tasks are allowed to run")),
|
|
847
|
+
( localize(7659, "Debugging is enabled")),
|
|
848
|
+
( localize(7661, "All workspace settings are applied")),
|
|
849
|
+
( localize(7660, "All enabled extensions are activated"))
|
|
850
850
|
];
|
|
851
851
|
this.renderLimitationsListElement(this.trustedContainer, trustedContainerItems, ThemeIcon.asClassNameArray(checkListIcon));
|
|
852
852
|
const [untrustedTitle, untrustedSubTitle] = this.getFeaturesHeaderText(false);
|
|
853
853
|
this.renderLimitationsHeaderElement(this.untrustedContainer, untrustedTitle, untrustedSubTitle);
|
|
854
854
|
const untrustedContainerItems = this.workspaceService.getWorkbenchState() === 1 ?
|
|
855
855
|
[
|
|
856
|
-
( localize(
|
|
857
|
-
( localize(
|
|
856
|
+
( localize(7662, "Tasks are not allowed to run")),
|
|
857
|
+
( localize(7663, "Debugging is disabled")),
|
|
858
858
|
fixBadLocalizedLinks(( localize(
|
|
859
|
-
|
|
859
|
+
7664,
|
|
860
860
|
"[{0} extensions]({1}) are disabled or have limited functionality",
|
|
861
861
|
numExtensions,
|
|
862
862
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
|
|
863
863
|
)))
|
|
864
864
|
] :
|
|
865
865
|
[
|
|
866
|
-
( localize(
|
|
867
|
-
( localize(
|
|
866
|
+
( localize(7662, "Tasks are not allowed to run")),
|
|
867
|
+
( localize(7663, "Debugging is disabled")),
|
|
868
868
|
fixBadLocalizedLinks(numSettings ? ( localize(
|
|
869
|
-
|
|
869
|
+
7665,
|
|
870
870
|
"[{0} workspace settings]({1}) are not applied",
|
|
871
871
|
numSettings,
|
|
872
872
|
'command:settings.filterUntrusted'
|
|
873
|
-
)) : ( localize(
|
|
873
|
+
)) : ( localize(7666, "Workspace settings requiring trust are not applied"))),
|
|
874
874
|
fixBadLocalizedLinks(( localize(
|
|
875
|
-
|
|
875
|
+
7664,
|
|
876
876
|
"[{0} extensions]({1}) are disabled or have limited functionality",
|
|
877
877
|
numExtensions,
|
|
878
878
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
|
|
@@ -902,7 +902,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
902
902
|
button.label = action.label;
|
|
903
903
|
button.enabled = enabled !== undefined ? enabled : action.enabled;
|
|
904
904
|
button.description = keybinding.getLabel();
|
|
905
|
-
button.element.ariaLabel = action.label + ', ' + ( localize(
|
|
905
|
+
button.element.ariaLabel = action.label + ', ' + ( localize(7667, "Keyboard Shortcut: {0}", keybinding.getAriaLabel()));
|
|
906
906
|
this.rerenderDisposables.add(button.onDidClick(e => {
|
|
907
907
|
if (e) {
|
|
908
908
|
EventHelper.stop(e, true);
|
|
@@ -912,7 +912,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
914
|
addTrustButtonToElement(parent) {
|
|
915
|
-
const trustAction = ( (new Action('workspace.trust.button.action.grant', ( localize(
|
|
915
|
+
const trustAction = ( (new Action('workspace.trust.button.action.grant', ( localize(7668, "Trust")), undefined, true, async () => {
|
|
916
916
|
await this.workspaceTrustManagementService.setWorkspaceTrust(true);
|
|
917
917
|
})));
|
|
918
918
|
const trustActions = [{ action: trustAction, keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter')[0] }];
|
|
@@ -921,11 +921,11 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
921
921
|
const name = basename(dirname(workspaceIdentifier.uri));
|
|
922
922
|
const trustMessageElement = append(parent, $('.trust-message-box'));
|
|
923
923
|
trustMessageElement.innerText = ( localize(
|
|
924
|
-
|
|
924
|
+
7669,
|
|
925
925
|
"Trust the authors of all files in the current folder or its parent '{0}'.",
|
|
926
926
|
name
|
|
927
927
|
));
|
|
928
|
-
const trustParentAction = ( (new Action('workspace.trust.button.action.grantParent', ( localize(
|
|
928
|
+
const trustParentAction = ( (new Action('workspace.trust.button.action.grantParent', ( localize(7670, "Trust Parent")), undefined, true, async () => {
|
|
929
929
|
await this.workspaceTrustManagementService.setParentFolderTrust(true);
|
|
930
930
|
})));
|
|
931
931
|
trustActions.push({ action: trustParentAction, keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Shift+Enter' : 'Ctrl+Shift+Enter')[0] });
|
|
@@ -934,7 +934,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
934
934
|
}
|
|
935
935
|
addDontTrustButtonToElement(parent) {
|
|
936
936
|
this.createButtonRow(parent, [{
|
|
937
|
-
action: ( (new Action('workspace.trust.button.action.deny', ( localize(
|
|
937
|
+
action: ( (new Action('workspace.trust.button.action.deny', ( localize(7671, "Don't Trust")), undefined, true, async () => {
|
|
938
938
|
await this.workspaceTrustManagementService.setWorkspaceTrust(false);
|
|
939
939
|
}))),
|
|
940
940
|
keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter')[0]
|
|
@@ -947,15 +947,15 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
947
947
|
const textElement = append(parent, $('.workspace-trust-untrusted-description'));
|
|
948
948
|
if (!this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
|
|
949
949
|
textElement.innerText = this.workspaceService.getWorkbenchState() === 3 ? ( localize(
|
|
950
|
-
|
|
950
|
+
7672,
|
|
951
951
|
"This workspace is trusted via the bolded entries in the trusted folders below."
|
|
952
952
|
)) : ( localize(
|
|
953
|
-
|
|
953
|
+
7673,
|
|
954
954
|
"This folder is trusted via the bolded entries in the the trusted folders below."
|
|
955
955
|
));
|
|
956
956
|
}
|
|
957
957
|
else {
|
|
958
|
-
textElement.innerText = ( localize(
|
|
958
|
+
textElement.innerText = ( localize(7674, "This window is trusted by nature of the workspace that is opened."));
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
renderLimitationsHeaderElement(parent, headerText, subtitleText) {
|
|
@@ -5,7 +5,7 @@ import { localize } from 'vscode/vscode/vs/nls';
|
|
|
5
5
|
import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
6
6
|
import { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
|
|
7
7
|
|
|
8
|
-
const WorkspaceTrustEditorIcon = registerIcon('workspace-trust-editor-label-icon', Codicon.shield, ( localize(
|
|
8
|
+
const WorkspaceTrustEditorIcon = registerIcon('workspace-trust-editor-label-icon', Codicon.shield, ( localize(7614, 'Icon of the workspace trust editor label.')));
|
|
9
9
|
class WorkspaceTrustEditorInput extends EditorInput {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
@@ -25,7 +25,7 @@ class WorkspaceTrustEditorInput extends EditorInput {
|
|
|
25
25
|
return super.matches(otherInput) || otherInput instanceof WorkspaceTrustEditorInput;
|
|
26
26
|
}
|
|
27
27
|
getName() {
|
|
28
|
-
return ( localize(
|
|
28
|
+
return ( localize(7615, "Workspace Trust"));
|
|
29
29
|
}
|
|
30
30
|
getIcon() {
|
|
31
31
|
return WorkspaceTrustEditorIcon;
|