@codingame/monaco-vscode-workspace-trust-service-override 8.0.2 → 8.0.3
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": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
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@8.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@8.0.3"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -64,12 +64,12 @@ import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/
|
|
|
64
64
|
import { basename, dirname } from 'vscode/vscode/vs/base/common/resources';
|
|
65
65
|
|
|
66
66
|
var TrustedUriActionsColumnRenderer_1, TrustedUriPathColumnRenderer_1, TrustedUriHostColumnRenderer_1, WorkspaceTrustEditor_1;
|
|
67
|
-
const shieldIcon = registerIcon('workspace-trust-banner', Codicon.shield, ( localize(
|
|
68
|
-
const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, ( localize(
|
|
69
|
-
const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, ( localize(
|
|
70
|
-
const folderPickerIcon = registerIcon('workspace-trust-editor-folder-picker', Codicon.folder, ( localize(
|
|
71
|
-
const editIcon = registerIcon('workspace-trust-editor-edit-folder', Codicon.edit, ( localize(
|
|
72
|
-
const removeIcon = registerIcon('workspace-trust-editor-remove-folder', Codicon.close, ( localize(
|
|
67
|
+
const shieldIcon = registerIcon('workspace-trust-banner', Codicon.shield, ( localize(7356, 'Icon for workspace trust ion the banner.')));
|
|
68
|
+
const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, ( localize(7357, 'Icon for the checkmark in the workspace trust editor.')));
|
|
69
|
+
const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, ( localize(7358, 'Icon for the cross in the workspace trust editor.')));
|
|
70
|
+
const folderPickerIcon = registerIcon('workspace-trust-editor-folder-picker', Codicon.folder, ( localize(7359, 'Icon for the pick folder icon in the workspace trust editor.')));
|
|
71
|
+
const editIcon = registerIcon('workspace-trust-editor-edit-folder', Codicon.edit, ( localize(7360, 'Icon for the edit folder icon in the workspace trust editor.')));
|
|
72
|
+
const removeIcon = registerIcon('workspace-trust-editor-remove-folder', Codicon.close, ( localize(7361, 'Icon for the remove folder icon in the workspace trust editor.')));
|
|
73
73
|
let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposable {
|
|
74
74
|
constructor(container, instantiationService, workspaceService, workspaceTrustManagementService, uriService, labelService, fileDialogService) {
|
|
75
75
|
super();
|
|
@@ -93,14 +93,14 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
93
93
|
const addButtonBarElement = container.appendChild($('.trusted-uris-button-bar'));
|
|
94
94
|
this.table = this.instantiationService.createInstance(WorkbenchTable, 'WorkspaceTrust', tableElement, ( (new TrustedUriTableVirtualDelegate())), [
|
|
95
95
|
{
|
|
96
|
-
label: ( localize(
|
|
96
|
+
label: ( localize(7362, "Host")),
|
|
97
97
|
tooltip: '',
|
|
98
98
|
weight: 1,
|
|
99
99
|
templateId: TrustedUriHostColumnRenderer.TEMPLATE_ID,
|
|
100
100
|
project(row) { return row; }
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
|
-
label: ( localize(
|
|
103
|
+
label: ( localize(7363, "Path")),
|
|
104
104
|
tooltip: '',
|
|
105
105
|
weight: 8,
|
|
106
106
|
templateId: TrustedUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -128,16 +128,16 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
128
128
|
getAriaLabel: (item) => {
|
|
129
129
|
const hostLabel = getHostLabel(this.labelService, item);
|
|
130
130
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
131
|
-
return ( localize(
|
|
131
|
+
return ( localize(7364, "{0}, trusted", this.labelService.getUriLabel(item.uri)));
|
|
132
132
|
}
|
|
133
133
|
return ( localize(
|
|
134
|
-
|
|
134
|
+
7365,
|
|
135
135
|
"{0} on {1}, trusted",
|
|
136
136
|
this.labelService.getUriLabel(item.uri),
|
|
137
137
|
hostLabel
|
|
138
138
|
));
|
|
139
139
|
},
|
|
140
|
-
getWidgetAriaLabel: () => ( localize(
|
|
140
|
+
getWidgetAriaLabel: () => ( localize(7366, "Trusted Folders & Workspaces"))
|
|
141
141
|
},
|
|
142
142
|
identityProvider: {
|
|
143
143
|
getId(element) {
|
|
@@ -153,16 +153,16 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
153
153
|
}
|
|
154
154
|
}));
|
|
155
155
|
const buttonBar = this._register(( (new ButtonBar(addButtonBarElement))));
|
|
156
|
-
const addButton = this._register(buttonBar.addButton({ title: ( localize(
|
|
157
|
-
addButton.label = ( localize(
|
|
156
|
+
const addButton = this._register(buttonBar.addButton({ title: ( localize(7367, "Add Folder")), ...defaultButtonStyles }));
|
|
157
|
+
addButton.label = ( localize(7367, "Add Folder"));
|
|
158
158
|
this._register(addButton.onDidClick(async () => {
|
|
159
159
|
const uri = await this.fileDialogService.showOpenDialog({
|
|
160
160
|
canSelectFiles: false,
|
|
161
161
|
canSelectFolders: true,
|
|
162
162
|
canSelectMany: false,
|
|
163
163
|
defaultUri: this.currentWorkspaceUri,
|
|
164
|
-
openLabel: ( localize(
|
|
165
|
-
title: ( localize(
|
|
164
|
+
openLabel: ( localize(7368, "Trust Folder")),
|
|
165
|
+
title: ( localize(7369, "Select Folder To Trust"))
|
|
166
166
|
});
|
|
167
167
|
if (uri) {
|
|
168
168
|
this.workspaceTrustManagementService.setUrisTrust(uri, true);
|
|
@@ -243,10 +243,10 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
243
243
|
this.container.classList.toggle('empty', entries.length === 0);
|
|
244
244
|
this.descriptionElement.innerText = entries.length ?
|
|
245
245
|
( localize(
|
|
246
|
-
|
|
246
|
+
7370,
|
|
247
247
|
"You trust the following folders, their subfolders, and workspace files."
|
|
248
248
|
)) :
|
|
249
|
-
( localize(
|
|
249
|
+
( localize(7371, "You haven't trusted any folders or workspace files yet."));
|
|
250
250
|
this.table.splice(0, Number.POSITIVE_INFINITY, this.trustedUriEntries);
|
|
251
251
|
this.layout();
|
|
252
252
|
}
|
|
@@ -260,7 +260,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
260
260
|
return {
|
|
261
261
|
type: MessageType.WARNING,
|
|
262
262
|
content: ( localize(
|
|
263
|
-
|
|
263
|
+
7372,
|
|
264
264
|
"You will trust all repositories on {0}.",
|
|
265
265
|
getHostLabel(this.labelService, item)
|
|
266
266
|
))
|
|
@@ -270,7 +270,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
270
270
|
return {
|
|
271
271
|
type: MessageType.WARNING,
|
|
272
272
|
content: ( localize(
|
|
273
|
-
|
|
273
|
+
7373,
|
|
274
274
|
"You will trust all repositories and forks under '{0}' on {1}.",
|
|
275
275
|
segments[0],
|
|
276
276
|
getHostLabel(this.labelService, item)
|
|
@@ -280,7 +280,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
280
280
|
if (segments.length > 2) {
|
|
281
281
|
return {
|
|
282
282
|
type: MessageType.ERROR,
|
|
283
|
-
content: ( localize(
|
|
283
|
+
content: ( localize(7374, "You cannot trust individual folders within a repository.", path))
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
286
|
}
|
|
@@ -321,8 +321,8 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
321
321
|
canSelectFolders: true,
|
|
322
322
|
canSelectMany: false,
|
|
323
323
|
defaultUri: item.uri,
|
|
324
|
-
openLabel: ( localize(
|
|
325
|
-
title: ( localize(
|
|
324
|
+
openLabel: ( localize(7368, "Trust Folder")),
|
|
325
|
+
title: ( localize(7369, "Select Folder To Trust"))
|
|
326
326
|
});
|
|
327
327
|
if (uri) {
|
|
328
328
|
this.acceptEdit(item, uri[0]);
|
|
@@ -389,7 +389,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
389
389
|
class: ThemeIcon.asClassName(editIcon),
|
|
390
390
|
enabled: true,
|
|
391
391
|
id: 'editTrustedUri',
|
|
392
|
-
tooltip: ( localize(
|
|
392
|
+
tooltip: ( localize(7375, "Edit Path")),
|
|
393
393
|
run: () => {
|
|
394
394
|
this.table.edit(item, false);
|
|
395
395
|
}
|
|
@@ -401,7 +401,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
401
401
|
class: ThemeIcon.asClassName(folderPickerIcon),
|
|
402
402
|
enabled: true,
|
|
403
403
|
id: 'pickerTrustedUri',
|
|
404
|
-
tooltip: ( localize(
|
|
404
|
+
tooltip: ( localize(7376, "Open File Picker")),
|
|
405
405
|
run: () => {
|
|
406
406
|
this.table.edit(item, true);
|
|
407
407
|
}
|
|
@@ -413,7 +413,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
413
413
|
class: ThemeIcon.asClassName(removeIcon),
|
|
414
414
|
enabled: true,
|
|
415
415
|
id: 'deleteTrustedUri',
|
|
416
|
-
tooltip: ( localize(
|
|
416
|
+
tooltip: ( localize(7377, "Delete Path")),
|
|
417
417
|
run: async () => {
|
|
418
418
|
await this.table.delete(item);
|
|
419
419
|
}
|
|
@@ -530,7 +530,7 @@ TrustedUriPathColumnRenderer = TrustedUriPathColumnRenderer_1 = ( (__decorate([
|
|
|
530
530
|
( (__param(1, IContextViewService)))
|
|
531
531
|
], TrustedUriPathColumnRenderer)));
|
|
532
532
|
function getHostLabel(labelService, item) {
|
|
533
|
-
return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localize(
|
|
533
|
+
return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localize(7378, "Local"));
|
|
534
534
|
}
|
|
535
535
|
let TrustedUriHostColumnRenderer = class TrustedUriHostColumnRenderer {
|
|
536
536
|
static { TrustedUriHostColumnRenderer_1 = this; }
|
|
@@ -663,18 +663,18 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
663
663
|
getHeaderTitleText(trusted) {
|
|
664
664
|
if (trusted) {
|
|
665
665
|
if (this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
|
|
666
|
-
return ( localize(
|
|
666
|
+
return ( localize(7379, "This window is trusted"));
|
|
667
667
|
}
|
|
668
668
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
669
669
|
case WorkbenchState.EMPTY:
|
|
670
|
-
return ( localize(
|
|
670
|
+
return ( localize(7380, "You trust this window"));
|
|
671
671
|
case WorkbenchState.FOLDER:
|
|
672
|
-
return ( localize(
|
|
672
|
+
return ( localize(7381, "You trust this folder"));
|
|
673
673
|
case WorkbenchState.WORKSPACE:
|
|
674
|
-
return ( localize(
|
|
674
|
+
return ( localize(7382, "You trust this workspace"));
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
|
-
return ( localize(
|
|
677
|
+
return ( localize(7383, "You are in Restricted Mode"));
|
|
678
678
|
}
|
|
679
679
|
getHeaderTitleIconClassNames(trusted) {
|
|
680
680
|
return ThemeIcon.asClassNameArray(shieldIcon);
|
|
@@ -684,37 +684,37 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
684
684
|
let subTitle = '';
|
|
685
685
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
686
686
|
case WorkbenchState.EMPTY: {
|
|
687
|
-
title = trusted ? ( localize(
|
|
687
|
+
title = trusted ? ( localize(7384, "In a Trusted Window")) : ( localize(7385, "In Restricted Mode"));
|
|
688
688
|
subTitle = trusted ? ( localize(
|
|
689
|
-
|
|
689
|
+
7386,
|
|
690
690
|
"You trust the authors of the files in the current window. All features are enabled:"
|
|
691
691
|
)) :
|
|
692
692
|
( localize(
|
|
693
|
-
|
|
693
|
+
7387,
|
|
694
694
|
"You do not trust the authors of the files in the current window. The following features are disabled:"
|
|
695
695
|
));
|
|
696
696
|
break;
|
|
697
697
|
}
|
|
698
698
|
case WorkbenchState.FOLDER: {
|
|
699
|
-
title = trusted ? ( localize(
|
|
699
|
+
title = trusted ? ( localize(7388, "In a Trusted Folder")) : ( localize(7385, "In Restricted Mode"));
|
|
700
700
|
subTitle = trusted ? ( localize(
|
|
701
|
-
|
|
701
|
+
7389,
|
|
702
702
|
"You trust the authors of the files in the current folder. All features are enabled:"
|
|
703
703
|
)) :
|
|
704
704
|
( localize(
|
|
705
|
-
|
|
705
|
+
7390,
|
|
706
706
|
"You do not trust the authors of the files in the current folder. The following features are disabled:"
|
|
707
707
|
));
|
|
708
708
|
break;
|
|
709
709
|
}
|
|
710
710
|
case WorkbenchState.WORKSPACE: {
|
|
711
|
-
title = trusted ? ( localize(
|
|
711
|
+
title = trusted ? ( localize(7391, "In a Trusted Workspace")) : ( localize(7385, "In Restricted Mode"));
|
|
712
712
|
subTitle = trusted ? ( localize(
|
|
713
|
-
|
|
713
|
+
7392,
|
|
714
714
|
"You trust the authors of the files in the current workspace. All features are enabled:"
|
|
715
715
|
)) :
|
|
716
716
|
( localize(
|
|
717
|
-
|
|
717
|
+
7393,
|
|
718
718
|
"You do not trust the authors of the files in the current workspace. The following features are disabled:"
|
|
719
719
|
));
|
|
720
720
|
break;
|
|
@@ -738,17 +738,17 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
738
738
|
const headerDescriptionText = append(this.headerDescription, $('div'));
|
|
739
739
|
headerDescriptionText.innerText = isWorkspaceTrusted ?
|
|
740
740
|
( localize(
|
|
741
|
-
|
|
741
|
+
7394,
|
|
742
742
|
"All features are enabled because trust has been granted to the workspace."
|
|
743
743
|
)) :
|
|
744
744
|
( localize(
|
|
745
|
-
|
|
745
|
+
7395,
|
|
746
746
|
"{0} is in a restricted mode intended for safe code browsing.",
|
|
747
747
|
this.productService.nameShort
|
|
748
748
|
));
|
|
749
749
|
const headerDescriptionActions = append(this.headerDescription, $('div'));
|
|
750
750
|
const headerDescriptionActionsText = ( localize(
|
|
751
|
-
|
|
751
|
+
7396,
|
|
752
752
|
"[Configure your settings]({0}) or [learn more](https://aka.ms/vscode-workspace-trust).",
|
|
753
753
|
`command:workbench.trust.configure`
|
|
754
754
|
));
|
|
@@ -761,7 +761,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
763
|
this.headerContainer.className = this.getHeaderContainerClass(isWorkspaceTrusted);
|
|
764
|
-
this.rootElement.setAttribute('aria-label', `${( localize(
|
|
764
|
+
this.rootElement.setAttribute('aria-label', `${( localize(7397, "Manage Workspace Trust"))}: ${this.headerContainer.innerText}`);
|
|
765
765
|
const restrictedSettings = this.configurationService.restrictedSettings;
|
|
766
766
|
const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
|
|
767
767
|
const settingsRequiringTrustedWorkspaceCount = restrictedSettings.default.filter(key => {
|
|
@@ -826,7 +826,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
826
826
|
createConfigurationElement(parent) {
|
|
827
827
|
this.configurationContainer = append(parent, $('.workspace-trust-settings', { tabIndex: '0' }));
|
|
828
828
|
const configurationTitle = append(this.configurationContainer, $('.workspace-trusted-folders-title'));
|
|
829
|
-
configurationTitle.innerText = ( localize(
|
|
829
|
+
configurationTitle.innerText = ( localize(7366, "Trusted Folders & Workspaces"));
|
|
830
830
|
this.workspaceTrustedUrisTable = this._register(this.instantiationService.createInstance(WorkspaceTrustedUrisTable, this.configurationContainer));
|
|
831
831
|
}
|
|
832
832
|
createAffectedFeaturesElement(parent) {
|
|
@@ -841,41 +841,41 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
841
841
|
this.renderLimitationsHeaderElement(this.trustedContainer, trustedTitle, trustedSubTitle);
|
|
842
842
|
const trustedContainerItems = this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY ?
|
|
843
843
|
[
|
|
844
|
-
( localize(
|
|
845
|
-
( localize(
|
|
846
|
-
( localize(
|
|
844
|
+
( localize(7398, "Tasks are allowed to run")),
|
|
845
|
+
( localize(7399, "Debugging is enabled")),
|
|
846
|
+
( localize(7400, "All enabled extensions are activated"))
|
|
847
847
|
] :
|
|
848
848
|
[
|
|
849
|
-
( localize(
|
|
850
|
-
( localize(
|
|
851
|
-
( localize(
|
|
852
|
-
( localize(
|
|
849
|
+
( localize(7398, "Tasks are allowed to run")),
|
|
850
|
+
( localize(7399, "Debugging is enabled")),
|
|
851
|
+
( localize(7401, "All workspace settings are applied")),
|
|
852
|
+
( localize(7400, "All enabled extensions are activated"))
|
|
853
853
|
];
|
|
854
854
|
this.renderLimitationsListElement(this.trustedContainer, trustedContainerItems, ThemeIcon.asClassNameArray(checkListIcon));
|
|
855
855
|
const [untrustedTitle, untrustedSubTitle] = this.getFeaturesHeaderText(false);
|
|
856
856
|
this.renderLimitationsHeaderElement(this.untrustedContainer, untrustedTitle, untrustedSubTitle);
|
|
857
857
|
const untrustedContainerItems = this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY ?
|
|
858
858
|
[
|
|
859
|
-
( localize(
|
|
860
|
-
( localize(
|
|
859
|
+
( localize(7402, "Tasks are not allowed to run")),
|
|
860
|
+
( localize(7403, "Debugging is disabled")),
|
|
861
861
|
fixBadLocalizedLinks(( localize(
|
|
862
|
-
|
|
862
|
+
7404,
|
|
863
863
|
"[{0} extensions]({1}) are disabled or have limited functionality",
|
|
864
864
|
numExtensions,
|
|
865
865
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
|
|
866
866
|
)))
|
|
867
867
|
] :
|
|
868
868
|
[
|
|
869
|
-
( localize(
|
|
870
|
-
( localize(
|
|
869
|
+
( localize(7402, "Tasks are not allowed to run")),
|
|
870
|
+
( localize(7403, "Debugging is disabled")),
|
|
871
871
|
fixBadLocalizedLinks(numSettings ? ( localize(
|
|
872
|
-
|
|
872
|
+
7405,
|
|
873
873
|
"[{0} workspace settings]({1}) are not applied",
|
|
874
874
|
numSettings,
|
|
875
875
|
'command:settings.filterUntrusted'
|
|
876
|
-
)) : ( localize(
|
|
876
|
+
)) : ( localize(7406, "Workspace settings requiring trust are not applied"))),
|
|
877
877
|
fixBadLocalizedLinks(( localize(
|
|
878
|
-
|
|
878
|
+
7404,
|
|
879
879
|
"[{0} extensions]({1}) are disabled or have limited functionality",
|
|
880
880
|
numExtensions,
|
|
881
881
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
|
|
@@ -905,7 +905,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
905
905
|
button.label = action.label;
|
|
906
906
|
button.enabled = enabled !== undefined ? enabled : action.enabled;
|
|
907
907
|
button.description = keybinding.getLabel();
|
|
908
|
-
button.element.ariaLabel = action.label + ', ' + ( localize(
|
|
908
|
+
button.element.ariaLabel = action.label + ', ' + ( localize(7407, "Keyboard Shortcut: {0}", keybinding.getAriaLabel()));
|
|
909
909
|
this.rerenderDisposables.add(button.onDidClick(e => {
|
|
910
910
|
if (e) {
|
|
911
911
|
EventHelper.stop(e, true);
|
|
@@ -915,7 +915,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
917
|
addTrustButtonToElement(parent) {
|
|
918
|
-
const trustAction = ( (new Action('workspace.trust.button.action.grant', ( localize(
|
|
918
|
+
const trustAction = ( (new Action('workspace.trust.button.action.grant', ( localize(7408, "Trust")), undefined, true, async () => {
|
|
919
919
|
await this.workspaceTrustManagementService.setWorkspaceTrust(true);
|
|
920
920
|
})));
|
|
921
921
|
const trustActions = [{ action: trustAction, keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter')[0] }];
|
|
@@ -924,11 +924,11 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
924
924
|
const name = basename(dirname(workspaceIdentifier.uri));
|
|
925
925
|
const trustMessageElement = append(parent, $('.trust-message-box'));
|
|
926
926
|
trustMessageElement.innerText = ( localize(
|
|
927
|
-
|
|
927
|
+
7409,
|
|
928
928
|
"Trust the authors of all files in the current folder or its parent '{0}'.",
|
|
929
929
|
name
|
|
930
930
|
));
|
|
931
|
-
const trustParentAction = ( (new Action('workspace.trust.button.action.grantParent', ( localize(
|
|
931
|
+
const trustParentAction = ( (new Action('workspace.trust.button.action.grantParent', ( localize(7410, "Trust Parent")), undefined, true, async () => {
|
|
932
932
|
await this.workspaceTrustManagementService.setParentFolderTrust(true);
|
|
933
933
|
})));
|
|
934
934
|
trustActions.push({ action: trustParentAction, keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Shift+Enter' : 'Ctrl+Shift+Enter')[0] });
|
|
@@ -937,7 +937,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
937
937
|
}
|
|
938
938
|
addDontTrustButtonToElement(parent) {
|
|
939
939
|
this.createButtonRow(parent, [{
|
|
940
|
-
action: ( (new Action('workspace.trust.button.action.deny', ( localize(
|
|
940
|
+
action: ( (new Action('workspace.trust.button.action.deny', ( localize(7411, "Don't Trust")), undefined, true, async () => {
|
|
941
941
|
await this.workspaceTrustManagementService.setWorkspaceTrust(false);
|
|
942
942
|
}))),
|
|
943
943
|
keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter')[0]
|
|
@@ -950,15 +950,15 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
950
950
|
const textElement = append(parent, $('.workspace-trust-untrusted-description'));
|
|
951
951
|
if (!this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
|
|
952
952
|
textElement.innerText = this.workspaceService.getWorkbenchState() === WorkbenchState.WORKSPACE ? ( localize(
|
|
953
|
-
|
|
953
|
+
7412,
|
|
954
954
|
"This workspace is trusted via the bolded entries in the trusted folders below."
|
|
955
955
|
)) : ( localize(
|
|
956
|
-
|
|
956
|
+
7413,
|
|
957
957
|
"This folder is trusted via the bolded entries in the the trusted folders below."
|
|
958
958
|
));
|
|
959
959
|
}
|
|
960
960
|
else {
|
|
961
|
-
textElement.innerText = ( localize(
|
|
961
|
+
textElement.innerText = ( localize(7414, "This window is trusted by nature of the workspace that is opened."));
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
964
|
renderLimitationsHeaderElement(parent, headerText, subtitleText) {
|
|
@@ -6,7 +6,7 @@ import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistr
|
|
|
6
6
|
import { EditorInputCapabilities } from 'vscode/vscode/vs/workbench/common/editor';
|
|
7
7
|
import { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
|
|
8
8
|
|
|
9
|
-
const WorkspaceTrustEditorIcon = registerIcon('workspace-trust-editor-label-icon', Codicon.shield, ( localize(
|
|
9
|
+
const WorkspaceTrustEditorIcon = registerIcon('workspace-trust-editor-label-icon', Codicon.shield, ( localize(7415, 'Icon of the workspace trust editor label.')));
|
|
10
10
|
class WorkspaceTrustEditorInput extends EditorInput {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
@@ -26,7 +26,7 @@ class WorkspaceTrustEditorInput extends EditorInput {
|
|
|
26
26
|
return super.matches(otherInput) || otherInput instanceof WorkspaceTrustEditorInput;
|
|
27
27
|
}
|
|
28
28
|
getName() {
|
|
29
|
-
return ( localize(
|
|
29
|
+
return ( localize(7416, "Workspace Trust"));
|
|
30
30
|
}
|
|
31
31
|
getIcon() {
|
|
32
32
|
return WorkspaceTrustEditorIcon;
|