@codingame/monaco-vscode-workspace-trust-service-override 10.1.3 → 11.0.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 +2 -2
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspace.contribution.js +59 -59
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.js +68 -68
- package/vscode/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-workspace-trust-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.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@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@11.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -87,30 +87,30 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
87
87
|
const markdownDetails = [
|
|
88
88
|
this.workspaceContextService.getWorkbenchState() !== 1 ?
|
|
89
89
|
( localize(
|
|
90
|
-
|
|
90
|
+
2741,
|
|
91
91
|
"You are trying to open untrusted files in a workspace which is trusted."
|
|
92
92
|
)) :
|
|
93
93
|
( localize(
|
|
94
|
-
|
|
94
|
+
2742,
|
|
95
95
|
"You are trying to open untrusted files in a window which is trusted."
|
|
96
96
|
)),
|
|
97
97
|
( localize(
|
|
98
|
-
|
|
98
|
+
2743,
|
|
99
99
|
"If you don't want to open untrusted files, we recommend to open them in Restricted Mode in a new window as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."
|
|
100
100
|
))
|
|
101
101
|
];
|
|
102
102
|
await this.dialogService.prompt({
|
|
103
103
|
type: Severity$1.Info,
|
|
104
104
|
message: this.workspaceContextService.getWorkbenchState() !== 1 ?
|
|
105
|
-
( localize(
|
|
106
|
-
( localize(
|
|
105
|
+
( localize(2744, "Do you want to allow untrusted files in this workspace?")) :
|
|
106
|
+
( localize(2745, "Do you want to allow untrusted files in this window?")),
|
|
107
107
|
buttons: [
|
|
108
108
|
{
|
|
109
|
-
label: ( localize(
|
|
109
|
+
label: ( localize(2746, "&&Open")),
|
|
110
110
|
run: ({ checkboxChecked }) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(1 , !!checkboxChecked)
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
|
-
label: ( localize(
|
|
113
|
+
label: ( localize(2747, "Open in &&Restricted Mode")),
|
|
114
114
|
run: ({ checkboxChecked }) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(2 , !!checkboxChecked)
|
|
115
115
|
}
|
|
116
116
|
],
|
|
@@ -118,7 +118,7 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
118
118
|
run: () => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(3 )
|
|
119
119
|
},
|
|
120
120
|
checkbox: {
|
|
121
|
-
label: ( localize(
|
|
121
|
+
label: ( localize(2748, "Remember my decision for all workspaces")),
|
|
122
122
|
checked: false
|
|
123
123
|
},
|
|
124
124
|
custom: {
|
|
@@ -130,19 +130,19 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
130
130
|
this._register(this.workspaceTrustRequestService.onDidInitiateWorkspaceTrustRequest(async (requestOptions) => {
|
|
131
131
|
await this.workspaceTrustManagementService.workspaceResolved;
|
|
132
132
|
const message = this.useWorkspaceLanguage ?
|
|
133
|
-
( localize(
|
|
134
|
-
( localize(
|
|
133
|
+
( localize(2749, "Do you trust the authors of the files in this workspace?")) :
|
|
134
|
+
( localize(2750, "Do you trust the authors of the files in this folder?"));
|
|
135
135
|
const defaultDetails = ( localize(
|
|
136
|
-
|
|
136
|
+
2751,
|
|
137
137
|
"A feature you are trying to use may be a security risk if you do not trust the source of the files or folders you currently have open."
|
|
138
138
|
));
|
|
139
139
|
const details = requestOptions?.message ?? defaultDetails;
|
|
140
140
|
const buttons = requestOptions?.buttons ?? [
|
|
141
|
-
{ label: this.useWorkspaceLanguage ? ( localize(
|
|
142
|
-
{ label: ( localize(
|
|
141
|
+
{ label: this.useWorkspaceLanguage ? ( localize(2752, "&&Trust Workspace & Continue")) : ( localize(2753, "&&Trust Folder & Continue")), type: 'ContinueWithTrust' },
|
|
142
|
+
{ label: ( localize(2754, "&&Manage")), type: 'Manage' }
|
|
143
143
|
];
|
|
144
144
|
if (!( (buttons.some(b => b.type === 'Cancel')))) {
|
|
145
|
-
buttons.push({ label: ( localize(
|
|
145
|
+
buttons.push({ label: ( localize(2755, "Cancel")), type: 'Cancel' });
|
|
146
146
|
}
|
|
147
147
|
const { result } = await this.dialogService.prompt({
|
|
148
148
|
type: Severity$1.Info,
|
|
@@ -152,7 +152,7 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
152
152
|
markdownDetails: [
|
|
153
153
|
{ markdown: ( (new MarkdownString(details))) },
|
|
154
154
|
{ markdown: ( (new MarkdownString(( localize(
|
|
155
|
-
|
|
155
|
+
2756,
|
|
156
156
|
"If you don't trust the authors of these files, we do not recommend continuing as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."
|
|
157
157
|
))))) }
|
|
158
158
|
]
|
|
@@ -253,12 +253,12 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
253
253
|
if (!( (addedFoldersTrustInfo.map(info => info.trusted))).every(trusted => trusted)) {
|
|
254
254
|
const { confirmed } = await this.dialogService.confirm({
|
|
255
255
|
type: Severity$1.Info,
|
|
256
|
-
message: ( localize(
|
|
256
|
+
message: ( localize(2757, "Do you trust the authors of the files in this folder?")),
|
|
257
257
|
detail: ( localize(
|
|
258
|
-
|
|
258
|
+
2758,
|
|
259
259
|
"You are adding files that are not currently trusted to a trusted workspace. Do you trust the authors of these new files?"
|
|
260
260
|
)),
|
|
261
|
-
cancelButton: ( localize(
|
|
261
|
+
cancelButton: ( localize(2759, 'No')),
|
|
262
262
|
custom: { icon: Codicon.shield }
|
|
263
263
|
});
|
|
264
264
|
await this.workspaceTrustManagementService.setUrisTrust(( (addedFoldersTrustInfo.map(i => i.uri))), confirmed);
|
|
@@ -286,30 +286,30 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
286
286
|
console.warn('AI generated workspace trust dialog contents not available.');
|
|
287
287
|
}
|
|
288
288
|
const title = titleString ?? (this.useWorkspaceLanguage ?
|
|
289
|
-
( localize(
|
|
290
|
-
( localize(
|
|
289
|
+
( localize(2749, "Do you trust the authors of the files in this workspace?")) :
|
|
290
|
+
( localize(2750, "Do you trust the authors of the files in this folder?")));
|
|
291
291
|
let checkboxText;
|
|
292
292
|
const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceContextService.getWorkspace());
|
|
293
293
|
const isSingleFolderWorkspace = isSingleFolderWorkspaceIdentifier(workspaceIdentifier);
|
|
294
294
|
const isEmptyWindow = isEmptyWorkspaceIdentifier(workspaceIdentifier);
|
|
295
295
|
if (!isAiGeneratedWorkspace && this.workspaceTrustManagementService.canSetParentFolderTrust()) {
|
|
296
296
|
const name = basename(dirname(workspaceIdentifier.uri));
|
|
297
|
-
checkboxText = ( localize(
|
|
297
|
+
checkboxText = ( localize(2760, "Trust the authors of all files in the parent folder '{0}'", name));
|
|
298
298
|
}
|
|
299
|
-
this.doShowModal(title, { label: trustOption ?? ( localize(
|
|
299
|
+
this.doShowModal(title, { label: trustOption ?? ( localize(2761, "&&Yes, I trust the authors")), sublabel: isSingleFolderWorkspace ? ( localize(2762, "Trust folder and enable all features")) : ( localize(2763, "Trust workspace and enable all features")) }, { label: dontTrustOption ?? ( localize(2764, "&&No, I don't trust the authors")), sublabel: isSingleFolderWorkspace ? ( localize(2765, "Browse folder in restricted mode")) : ( localize(2766, "Browse workspace in restricted mode")) }, [
|
|
300
300
|
!isSingleFolderWorkspace ?
|
|
301
301
|
( localize(
|
|
302
|
-
|
|
302
|
+
2767,
|
|
303
303
|
"{0} provides features that may automatically execute files in this workspace.",
|
|
304
304
|
this.productService.nameShort
|
|
305
305
|
)) :
|
|
306
306
|
( localize(
|
|
307
|
-
|
|
307
|
+
2768,
|
|
308
308
|
"{0} provides features that may automatically execute files in this folder.",
|
|
309
309
|
this.productService.nameShort
|
|
310
310
|
)),
|
|
311
311
|
learnMoreString ?? ( localize(
|
|
312
|
-
|
|
312
|
+
2769,
|
|
313
313
|
"If you don't trust the authors of these files, we recommend to continue in restricted mode as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."
|
|
314
314
|
)),
|
|
315
315
|
!isEmptyWindow ?
|
|
@@ -427,11 +427,11 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
427
427
|
}
|
|
428
428
|
const actions = [
|
|
429
429
|
{
|
|
430
|
-
label: ( localize(
|
|
430
|
+
label: ( localize(2770, "Manage")),
|
|
431
431
|
href: 'command:' + MANAGE_TRUST_COMMAND_ID
|
|
432
432
|
},
|
|
433
433
|
{
|
|
434
|
-
label: ( localize(
|
|
434
|
+
label: ( localize(2771, "Learn More")),
|
|
435
435
|
href: 'https://aka.ms/vscode-workspace-trust'
|
|
436
436
|
}
|
|
437
437
|
];
|
|
@@ -452,17 +452,17 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
452
452
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
|
453
453
|
case 1 :
|
|
454
454
|
return ( localize(
|
|
455
|
-
|
|
455
|
+
2772,
|
|
456
456
|
"Restricted Mode is intended for safe code browsing. Trust this window to enable all features. Use navigation keys to access banner actions."
|
|
457
457
|
));
|
|
458
458
|
case 2 :
|
|
459
459
|
return ( localize(
|
|
460
|
-
|
|
460
|
+
2773,
|
|
461
461
|
"Restricted Mode is intended for safe code browsing. Trust this folder to enable all features. Use navigation keys to access banner actions."
|
|
462
462
|
));
|
|
463
463
|
case 3 :
|
|
464
464
|
return ( localize(
|
|
465
|
-
|
|
465
|
+
2774,
|
|
466
466
|
"Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features. Use navigation keys to access banner actions."
|
|
467
467
|
));
|
|
468
468
|
}
|
|
@@ -471,17 +471,17 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
471
471
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
|
472
472
|
case 1 :
|
|
473
473
|
return ( localize(
|
|
474
|
-
|
|
474
|
+
2775,
|
|
475
475
|
"Restricted Mode is intended for safe code browsing. Trust this window to enable all features."
|
|
476
476
|
));
|
|
477
477
|
case 2 :
|
|
478
478
|
return ( localize(
|
|
479
|
-
|
|
479
|
+
2776,
|
|
480
480
|
"Restricted Mode is intended for safe code browsing. Trust this folder to enable all features."
|
|
481
481
|
));
|
|
482
482
|
case 3 :
|
|
483
483
|
return ( localize(
|
|
484
|
-
|
|
484
|
+
2777,
|
|
485
485
|
"Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features."
|
|
486
486
|
));
|
|
487
487
|
}
|
|
@@ -499,12 +499,12 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
499
499
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
|
500
500
|
case 1 : {
|
|
501
501
|
ariaLabel = ( localize(
|
|
502
|
-
|
|
502
|
+
2778,
|
|
503
503
|
"Restricted Mode: Some features are disabled because this window is not trusted."
|
|
504
504
|
));
|
|
505
505
|
toolTip = {
|
|
506
506
|
value: ( localize(
|
|
507
|
-
|
|
507
|
+
2779,
|
|
508
508
|
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [window is not trusted]({1}).",
|
|
509
509
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
|
|
510
510
|
`command:${MANAGE_TRUST_COMMAND_ID}`
|
|
@@ -516,12 +516,12 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
516
516
|
}
|
|
517
517
|
case 2 : {
|
|
518
518
|
ariaLabel = ( localize(
|
|
519
|
-
|
|
519
|
+
2780,
|
|
520
520
|
"Restricted Mode: Some features are disabled because this folder is not trusted."
|
|
521
521
|
));
|
|
522
522
|
toolTip = {
|
|
523
523
|
value: ( localize(
|
|
524
|
-
|
|
524
|
+
2781,
|
|
525
525
|
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [folder is not trusted]({1}).",
|
|
526
526
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
|
|
527
527
|
`command:${MANAGE_TRUST_COMMAND_ID}`
|
|
@@ -533,12 +533,12 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
533
533
|
}
|
|
534
534
|
case 3 : {
|
|
535
535
|
ariaLabel = ( localize(
|
|
536
|
-
|
|
536
|
+
2782,
|
|
537
537
|
"Restricted Mode: Some features are disabled because this workspace is not trusted."
|
|
538
538
|
));
|
|
539
539
|
toolTip = {
|
|
540
540
|
value: ( localize(
|
|
541
|
-
|
|
541
|
+
2783,
|
|
542
542
|
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [workspace is not trusted]({1}).",
|
|
543
543
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
|
|
544
544
|
`command:${MANAGE_TRUST_COMMAND_ID}`
|
|
@@ -550,8 +550,8 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
return {
|
|
553
|
-
name: ( localize(
|
|
554
|
-
text: `$(shield) ${( localize(
|
|
553
|
+
name: ( localize(2784, "Workspace Trust")),
|
|
554
|
+
text: `$(shield) ${( localize(2785, "Restricted Mode"))}`,
|
|
555
555
|
ariaLabel: ariaLabel,
|
|
556
556
|
tooltip: toolTip,
|
|
557
557
|
command: MANAGE_TRUST_COMMAND_ID,
|
|
@@ -601,16 +601,16 @@ class WorkspaceTrustEditorInputSerializer {
|
|
|
601
601
|
}
|
|
602
602
|
( (Registry.as(EditorExtensions.EditorFactory)))
|
|
603
603
|
.registerEditorSerializer(WorkspaceTrustEditorInput.ID, WorkspaceTrustEditorInputSerializer);
|
|
604
|
-
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(WorkspaceTrustEditor, WorkspaceTrustEditor.ID, ( localize(
|
|
604
|
+
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(WorkspaceTrustEditor, WorkspaceTrustEditor.ID, ( localize(2786, "Workspace Trust Editor"))), [
|
|
605
605
|
( (new SyncDescriptor(WorkspaceTrustEditorInput)))
|
|
606
606
|
]);
|
|
607
607
|
const CONFIGURE_TRUST_COMMAND_ID = 'workbench.trust.configure';
|
|
608
|
-
const WORKSPACES_CATEGORY = ( localize2(
|
|
608
|
+
const WORKSPACES_CATEGORY = ( localize2(2787, 'Workspaces'));
|
|
609
609
|
registerAction2(class extends Action2 {
|
|
610
610
|
constructor() {
|
|
611
611
|
super({
|
|
612
612
|
id: CONFIGURE_TRUST_COMMAND_ID,
|
|
613
|
-
title: ( localize2(
|
|
613
|
+
title: ( localize2(2788, "Configure Workspace Trust Settings")),
|
|
614
614
|
precondition: ( (ContextKeyExpr.and(
|
|
615
615
|
WorkspaceTrustContext.IsEnabled,
|
|
616
616
|
(ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true))
|
|
@@ -627,7 +627,7 @@ registerAction2(class extends Action2 {
|
|
|
627
627
|
constructor() {
|
|
628
628
|
super({
|
|
629
629
|
id: MANAGE_TRUST_COMMAND_ID,
|
|
630
|
-
title: ( localize2(
|
|
630
|
+
title: ( localize2(2789, "Manage Workspace Trust")),
|
|
631
631
|
precondition: ( (ContextKeyExpr.and(
|
|
632
632
|
WorkspaceTrustContext.IsEnabled,
|
|
633
633
|
(ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true))
|
|
@@ -651,44 +651,44 @@ registerAction2(class extends Action2 {
|
|
|
651
651
|
[WORKSPACE_TRUST_ENABLED]: {
|
|
652
652
|
type: 'boolean',
|
|
653
653
|
default: true,
|
|
654
|
-
description: ( localize(
|
|
654
|
+
description: ( localize(2790, "Controls whether or not Workspace Trust is enabled within VS Code.")),
|
|
655
655
|
tags: [WORKSPACE_TRUST_SETTING_TAG],
|
|
656
656
|
scope: 1 ,
|
|
657
657
|
},
|
|
658
658
|
[WORKSPACE_TRUST_STARTUP_PROMPT]: {
|
|
659
659
|
type: 'string',
|
|
660
660
|
default: 'once',
|
|
661
|
-
description: ( localize(
|
|
661
|
+
description: ( localize(2791, "Controls when the startup prompt to trust a workspace is shown.")),
|
|
662
662
|
tags: [WORKSPACE_TRUST_SETTING_TAG],
|
|
663
663
|
scope: 1 ,
|
|
664
664
|
enum: ['always', 'once', 'never'],
|
|
665
665
|
enumDescriptions: [
|
|
666
|
-
( localize(
|
|
667
|
-
( localize(
|
|
668
|
-
( localize(
|
|
666
|
+
( localize(2792, "Ask for trust every time an untrusted workspace is opened.")),
|
|
667
|
+
( localize(2793, "Ask for trust the first time an untrusted workspace is opened.")),
|
|
668
|
+
( localize(2794, "Do not ask for trust when an untrusted workspace is opened.")),
|
|
669
669
|
]
|
|
670
670
|
},
|
|
671
671
|
[WORKSPACE_TRUST_BANNER]: {
|
|
672
672
|
type: 'string',
|
|
673
673
|
default: 'untilDismissed',
|
|
674
|
-
description: ( localize(
|
|
674
|
+
description: ( localize(2795, "Controls when the restricted mode banner is shown.")),
|
|
675
675
|
tags: [WORKSPACE_TRUST_SETTING_TAG],
|
|
676
676
|
scope: 1 ,
|
|
677
677
|
enum: ['always', 'untilDismissed', 'never'],
|
|
678
678
|
enumDescriptions: [
|
|
679
|
-
( localize(
|
|
679
|
+
( localize(2796, "Show the banner every time an untrusted workspace is open.")),
|
|
680
680
|
( localize(
|
|
681
|
-
|
|
681
|
+
2797,
|
|
682
682
|
"Show the banner when an untrusted workspace is opened until dismissed."
|
|
683
683
|
)),
|
|
684
|
-
( localize(
|
|
684
|
+
( localize(2798, "Do not show the banner when an untrusted workspace is open.")),
|
|
685
685
|
]
|
|
686
686
|
},
|
|
687
687
|
[WORKSPACE_TRUST_UNTRUSTED_FILES]: {
|
|
688
688
|
type: 'string',
|
|
689
689
|
default: 'prompt',
|
|
690
690
|
markdownDescription: ( localize(
|
|
691
|
-
|
|
691
|
+
2799,
|
|
692
692
|
"Controls how to handle opening untrusted files in a trusted workspace. This setting also applies to opening files in an empty window which is trusted via `#{0}#`.",
|
|
693
693
|
WORKSPACE_TRUST_EMPTY_WINDOW
|
|
694
694
|
)),
|
|
@@ -697,15 +697,15 @@ registerAction2(class extends Action2 {
|
|
|
697
697
|
enum: ['prompt', 'open', 'newWindow'],
|
|
698
698
|
enumDescriptions: [
|
|
699
699
|
( localize(
|
|
700
|
-
|
|
700
|
+
2800,
|
|
701
701
|
"Ask how to handle untrusted files for each workspace. Once untrusted files are introduced to a trusted workspace, you will not be prompted again."
|
|
702
702
|
)),
|
|
703
703
|
( localize(
|
|
704
|
-
|
|
704
|
+
2801,
|
|
705
705
|
"Always allow untrusted files to be introduced to a trusted workspace without prompting."
|
|
706
706
|
)),
|
|
707
707
|
( localize(
|
|
708
|
-
|
|
708
|
+
2802,
|
|
709
709
|
"Always open untrusted files in a separate window in restricted mode without prompting."
|
|
710
710
|
)),
|
|
711
711
|
]
|
|
@@ -714,7 +714,7 @@ registerAction2(class extends Action2 {
|
|
|
714
714
|
type: 'boolean',
|
|
715
715
|
default: true,
|
|
716
716
|
markdownDescription: ( localize(
|
|
717
|
-
|
|
717
|
+
2803,
|
|
718
718
|
"Controls whether or not the empty window is trusted by default within VS Code. When used with `#{0}#`, you can enable the full functionality of VS Code without prompting in an empty window.",
|
|
719
719
|
WORKSPACE_TRUST_UNTRUSTED_FILES
|
|
720
720
|
)),
|
|
@@ -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(7667, 'Icon for workspace trust ion the banner.')));
|
|
65
|
+
const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, ( localize(7668, 'Icon for the checkmark in the workspace trust editor.')));
|
|
66
|
+
const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, ( localize(7669, 'Icon for the cross in the workspace trust editor.')));
|
|
67
|
+
const folderPickerIcon = registerIcon('workspace-trust-editor-folder-picker', Codicon.folder, ( localize(7670, 'Icon for the pick folder icon in the workspace trust editor.')));
|
|
68
|
+
const editIcon = registerIcon('workspace-trust-editor-edit-folder', Codicon.edit, ( localize(7671, 'Icon for the edit folder icon in the workspace trust editor.')));
|
|
69
|
+
const removeIcon = registerIcon('workspace-trust-editor-remove-folder', Codicon.close, ( localize(7672, '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(7673, "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(7674, "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(7675, "{0}, trusted", this.labelService.getUriLabel(item.uri)));
|
|
129
129
|
}
|
|
130
130
|
return ( localize(
|
|
131
|
-
|
|
131
|
+
7676,
|
|
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(7677, "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(7678, "Add Folder")), ...defaultButtonStyles }));
|
|
154
|
+
addButton.label = ( localize(7678, "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(7679, "Trust Folder")),
|
|
162
|
+
title: ( localize(7680, "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
|
+
7681,
|
|
244
244
|
"You trust the following folders, their subfolders, and workspace files."
|
|
245
245
|
)) :
|
|
246
|
-
( localize(
|
|
246
|
+
( localize(7682, "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
|
+
7683,
|
|
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
|
+
7684,
|
|
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(7685, "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(7679, "Trust Folder")),
|
|
322
|
+
title: ( localize(7680, "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(7686, "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(7687, "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(7688, "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(7689, "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(7690, "This window is trusted"));
|
|
664
664
|
}
|
|
665
665
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
666
666
|
case 1 :
|
|
667
|
-
return ( localize(
|
|
667
|
+
return ( localize(7691, "You trust this window"));
|
|
668
668
|
case 2 :
|
|
669
|
-
return ( localize(
|
|
669
|
+
return ( localize(7692, "You trust this folder"));
|
|
670
670
|
case 3 :
|
|
671
|
-
return ( localize(
|
|
671
|
+
return ( localize(7693, "You trust this workspace"));
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
return ( localize(
|
|
674
|
+
return ( localize(7694, "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(7695, "In a Trusted Window")) : ( localize(7696, "In Restricted Mode"));
|
|
685
685
|
subTitle = trusted ? ( localize(
|
|
686
|
-
|
|
686
|
+
7697,
|
|
687
687
|
"You trust the authors of the files in the current window. All features are enabled:"
|
|
688
688
|
)) :
|
|
689
689
|
( localize(
|
|
690
|
-
|
|
690
|
+
7698,
|
|
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(7699, "In a Trusted Folder")) : ( localize(7696, "In Restricted Mode"));
|
|
697
697
|
subTitle = trusted ? ( localize(
|
|
698
|
-
|
|
698
|
+
7700,
|
|
699
699
|
"You trust the authors of the files in the current folder. All features are enabled:"
|
|
700
700
|
)) :
|
|
701
701
|
( localize(
|
|
702
|
-
|
|
702
|
+
7701,
|
|
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(7702, "In a Trusted Workspace")) : ( localize(7696, "In Restricted Mode"));
|
|
709
709
|
subTitle = trusted ? ( localize(
|
|
710
|
-
|
|
710
|
+
7703,
|
|
711
711
|
"You trust the authors of the files in the current workspace. All features are enabled:"
|
|
712
712
|
)) :
|
|
713
713
|
( localize(
|
|
714
|
-
|
|
714
|
+
7704,
|
|
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
|
+
7705,
|
|
739
739
|
"All features are enabled because trust has been granted to the workspace."
|
|
740
740
|
)) :
|
|
741
741
|
( localize(
|
|
742
|
-
|
|
742
|
+
7706,
|
|
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
|
+
7707,
|
|
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(7708, "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(7677, "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(7709, "Tasks are allowed to run")),
|
|
842
|
+
( localize(7710, "Debugging is enabled")),
|
|
843
|
+
( localize(7711, "All enabled extensions are activated"))
|
|
844
844
|
] :
|
|
845
845
|
[
|
|
846
|
-
( localize(
|
|
847
|
-
( localize(
|
|
848
|
-
( localize(
|
|
849
|
-
( localize(
|
|
846
|
+
( localize(7709, "Tasks are allowed to run")),
|
|
847
|
+
( localize(7710, "Debugging is enabled")),
|
|
848
|
+
( localize(7712, "All workspace settings are applied")),
|
|
849
|
+
( localize(7711, "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(7713, "Tasks are not allowed to run")),
|
|
857
|
+
( localize(7714, "Debugging is disabled")),
|
|
858
858
|
fixBadLocalizedLinks(( localize(
|
|
859
|
-
|
|
859
|
+
7715,
|
|
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(7713, "Tasks are not allowed to run")),
|
|
867
|
+
( localize(7714, "Debugging is disabled")),
|
|
868
868
|
fixBadLocalizedLinks(numSettings ? ( localize(
|
|
869
|
-
|
|
869
|
+
7716,
|
|
870
870
|
"[{0} workspace settings]({1}) are not applied",
|
|
871
871
|
numSettings,
|
|
872
872
|
'command:settings.filterUntrusted'
|
|
873
|
-
)) : ( localize(
|
|
873
|
+
)) : ( localize(7717, "Workspace settings requiring trust are not applied"))),
|
|
874
874
|
fixBadLocalizedLinks(( localize(
|
|
875
|
-
|
|
875
|
+
7715,
|
|
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(7718, "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(7719, "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
|
+
7720,
|
|
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(7721, "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(7722, "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
|
+
7723,
|
|
951
951
|
"This workspace is trusted via the bolded entries in the trusted folders below."
|
|
952
952
|
)) : ( localize(
|
|
953
|
-
|
|
953
|
+
7724,
|
|
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(7725, "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(7726, '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(7727, "Workspace Trust"));
|
|
29
29
|
}
|
|
30
30
|
getIcon() {
|
|
31
31
|
return WorkspaceTrustEditorIcon;
|