@codingame/monaco-vscode-workspace-trust-service-override 26.2.2 → 28.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 +63 -62
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.js +60 -60
- 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": "28.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - workspace-trust service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "28.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -16,6 +16,7 @@ import { IWorkspaceTrustEnablementService, IWorkspaceTrustManagementService, IWo
|
|
|
16
16
|
import { Extensions, registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
17
17
|
import { LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
18
18
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
19
|
+
import { MODAL_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
19
20
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
20
21
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
21
22
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
@@ -107,29 +108,29 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
107
108
|
await this.workspaceTrustManagementService.workspaceResolved;
|
|
108
109
|
const markdownDetails = [
|
|
109
110
|
this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY ? ( localize(
|
|
110
|
-
|
|
111
|
+
15146,
|
|
111
112
|
"You are trying to open untrusted files in a workspace which is trusted."
|
|
112
113
|
)) : ( localize(
|
|
113
|
-
|
|
114
|
+
15147,
|
|
114
115
|
"You are trying to open untrusted files in a window which is trusted."
|
|
115
116
|
)),
|
|
116
117
|
( localize(
|
|
117
|
-
|
|
118
|
+
15148,
|
|
118
119
|
"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."
|
|
119
120
|
))
|
|
120
121
|
];
|
|
121
122
|
await this.dialogService.prompt({
|
|
122
123
|
type: Severity.Info,
|
|
123
|
-
message: this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY ? ( localize(
|
|
124
|
+
message: this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY ? ( localize(15149, "Do you want to allow untrusted files in this workspace?")) : ( localize(15150, "Do you want to allow untrusted files in this window?")),
|
|
124
125
|
buttons: [{
|
|
125
|
-
label: ( localize(
|
|
126
|
+
label: ( localize(15151, "&&Open")),
|
|
126
127
|
run: (
|
|
127
128
|
{
|
|
128
129
|
checkboxChecked
|
|
129
130
|
}
|
|
130
131
|
) => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(WorkspaceTrustUriResponse.Open, !!checkboxChecked)
|
|
131
132
|
}, {
|
|
132
|
-
label: ( localize(
|
|
133
|
+
label: ( localize(15152, "Open in &&Restricted Mode")),
|
|
133
134
|
run: (
|
|
134
135
|
{
|
|
135
136
|
checkboxChecked
|
|
@@ -140,7 +141,7 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
140
141
|
run: () => this.workspaceTrustRequestService.completeOpenFilesTrustRequest(WorkspaceTrustUriResponse.Cancel)
|
|
141
142
|
},
|
|
142
143
|
checkbox: {
|
|
143
|
-
label: ( localize(
|
|
144
|
+
label: ( localize(15153, "Remember my decision for all workspaces")),
|
|
144
145
|
checked: false
|
|
145
146
|
},
|
|
146
147
|
custom: {
|
|
@@ -158,17 +159,17 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
158
159
|
this.workspaceTrustRequestService.onDidInitiateResourcesTrustRequest(async options => {
|
|
159
160
|
await this.workspaceTrustManagementService.workspaceResolved;
|
|
160
161
|
const markdownDetails = [options?.message ?? ( localize(
|
|
161
|
-
|
|
162
|
+
15154,
|
|
162
163
|
"You are trying to open an untrusted folder. Do you trust the authors of this content?"
|
|
163
164
|
)), ( localize(
|
|
164
|
-
|
|
165
|
+
15155,
|
|
165
166
|
"If you don't trust the authors of these files, we recommend not continuing as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."
|
|
166
167
|
)), `\`${this.labelService.getUriLabel(options.uri)}\``];
|
|
167
168
|
await this.dialogService.prompt({
|
|
168
169
|
type: Severity.Info,
|
|
169
|
-
message: ( localize(
|
|
170
|
+
message: ( localize(15156, "Do you trust the authors of the files in this folder?")),
|
|
170
171
|
buttons: [{
|
|
171
|
-
label: ( localize(
|
|
172
|
+
label: ( localize(15157, "&&Trust Folder & Continue")),
|
|
172
173
|
run: () => this.workspaceTrustRequestService.completeResourcesTrustRequest(options.uri, WorkspaceTrustUriResponse.Open)
|
|
173
174
|
}],
|
|
174
175
|
cancelButton: {
|
|
@@ -188,22 +189,22 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
188
189
|
this._register(
|
|
189
190
|
this.workspaceTrustRequestService.onDidInitiateWorkspaceTrustRequest(async requestOptions => {
|
|
190
191
|
await this.workspaceTrustManagementService.workspaceResolved;
|
|
191
|
-
const message = this.useWorkspaceLanguage ? ( localize(
|
|
192
|
+
const message = this.useWorkspaceLanguage ? ( localize(15158, "Do you trust the authors of the files in this workspace?")) : ( localize(15159, "Do you trust the authors of the files in this folder?"));
|
|
192
193
|
const defaultDetails = ( localize(
|
|
193
|
-
|
|
194
|
+
15160,
|
|
194
195
|
"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."
|
|
195
196
|
));
|
|
196
197
|
const details = requestOptions?.message ?? defaultDetails;
|
|
197
198
|
const buttons = requestOptions?.buttons ?? [{
|
|
198
|
-
label: this.useWorkspaceLanguage ? ( localize(
|
|
199
|
+
label: this.useWorkspaceLanguage ? ( localize(15161, "&&Trust Workspace & Continue")) : ( localize(15162, "&&Trust Folder & Continue")),
|
|
199
200
|
type: "ContinueWithTrust"
|
|
200
201
|
}, {
|
|
201
|
-
label: ( localize(
|
|
202
|
+
label: ( localize(15163, "&&Manage")),
|
|
202
203
|
type: "Manage"
|
|
203
204
|
}];
|
|
204
205
|
if (!( buttons.some(b => b.type === "Cancel"))) {
|
|
205
206
|
buttons.push({
|
|
206
|
-
label: ( localize(
|
|
207
|
+
label: ( localize(15164, "Cancel")),
|
|
207
208
|
type: "Cancel"
|
|
208
209
|
});
|
|
209
210
|
}
|
|
@@ -218,7 +219,7 @@ let WorkspaceTrustRequestHandler = class WorkspaceTrustRequestHandler extends Di
|
|
|
218
219
|
markdown: ( new MarkdownString(details))
|
|
219
220
|
}, {
|
|
220
221
|
markdown: ( new MarkdownString(( localize(
|
|
221
|
-
|
|
222
|
+
15165,
|
|
222
223
|
"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."
|
|
223
224
|
))))
|
|
224
225
|
}]
|
|
@@ -331,12 +332,12 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
331
332
|
confirmed
|
|
332
333
|
} = await this.dialogService.confirm({
|
|
333
334
|
type: Severity.Info,
|
|
334
|
-
message: ( localize(
|
|
335
|
+
message: ( localize(15166, "Do you trust the authors of the files in this folder?")),
|
|
335
336
|
detail: ( localize(
|
|
336
|
-
|
|
337
|
+
15167,
|
|
337
338
|
"You are adding files that are not currently trusted to a trusted workspace. Do you trust the authors of these new files?"
|
|
338
339
|
)),
|
|
339
|
-
cancelButton: ( localize(
|
|
340
|
+
cancelButton: ( localize(15168, "No")),
|
|
340
341
|
custom: {
|
|
341
342
|
icon: Codicon.shield
|
|
342
343
|
}
|
|
@@ -365,31 +366,31 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
365
366
|
} else {
|
|
366
367
|
console.warn("AI generated workspace trust dialog contents not available.");
|
|
367
368
|
}
|
|
368
|
-
const title = titleString ?? (this.useWorkspaceLanguage ? ( localize(
|
|
369
|
+
const title = titleString ?? (this.useWorkspaceLanguage ? ( localize(15158, "Do you trust the authors of the files in this workspace?")) : ( localize(15159, "Do you trust the authors of the files in this folder?")));
|
|
369
370
|
let checkboxText;
|
|
370
371
|
const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceContextService.getWorkspace());
|
|
371
372
|
const isSingleFolderWorkspace = isSingleFolderWorkspaceIdentifier(workspaceIdentifier);
|
|
372
373
|
const isEmptyWindow = isEmptyWorkspaceIdentifier(workspaceIdentifier);
|
|
373
374
|
if (!isAiGeneratedWorkspace && this.workspaceTrustManagementService.canSetParentFolderTrust()) {
|
|
374
375
|
const name = basename(dirname(workspaceIdentifier.uri));
|
|
375
|
-
checkboxText = ( localize(
|
|
376
|
+
checkboxText = ( localize(15169, "Trust the authors of all files in the parent folder '{0}'", name));
|
|
376
377
|
}
|
|
377
378
|
this.doShowModal(title, {
|
|
378
|
-
label: trustOption ?? ( localize(
|
|
379
|
-
sublabel: isSingleFolderWorkspace ? ( localize(
|
|
379
|
+
label: trustOption ?? ( localize(15170, "&&Yes, I trust the authors")),
|
|
380
|
+
sublabel: isSingleFolderWorkspace ? ( localize(15171, "Trust folder and enable all features")) : ( localize(15172, "Trust workspace and enable all features"))
|
|
380
381
|
}, {
|
|
381
|
-
label: dontTrustOption ?? ( localize(
|
|
382
|
-
sublabel: isSingleFolderWorkspace ? ( localize(
|
|
382
|
+
label: dontTrustOption ?? ( localize(15173, "&&No, I don't trust the authors")),
|
|
383
|
+
sublabel: isSingleFolderWorkspace ? ( localize(15174, "Open folder in restricted mode")) : ( localize(15175, "Open workspace in restricted mode"))
|
|
383
384
|
}, [!isSingleFolderWorkspace ? ( localize(
|
|
384
|
-
|
|
385
|
+
15176,
|
|
385
386
|
"{0} provides features that may automatically execute files in this workspace.",
|
|
386
387
|
this.productService.nameShort
|
|
387
388
|
)) : ( localize(
|
|
388
|
-
|
|
389
|
+
15177,
|
|
389
390
|
"{0} provides features that may automatically execute files in this folder.",
|
|
390
391
|
this.productService.nameShort
|
|
391
392
|
)), learnMoreString ?? ( localize(
|
|
392
|
-
|
|
393
|
+
15178,
|
|
393
394
|
"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."
|
|
394
395
|
)), !isEmptyWindow ? `\`${this.labelService.getWorkspaceLabel(workspaceIdentifier, {
|
|
395
396
|
verbose: Verbosity.LONG
|
|
@@ -515,10 +516,10 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
515
516
|
return undefined;
|
|
516
517
|
}
|
|
517
518
|
const actions = [{
|
|
518
|
-
label: ( localize(
|
|
519
|
+
label: ( localize(15179, "Manage")),
|
|
519
520
|
href: "command:" + MANAGE_TRUST_COMMAND_ID
|
|
520
521
|
}, {
|
|
521
|
-
label: ( localize(
|
|
522
|
+
label: ( localize(15180, "Learn More")),
|
|
522
523
|
href: "https://aka.ms/vscode-workspace-trust"
|
|
523
524
|
}];
|
|
524
525
|
return {
|
|
@@ -543,17 +544,17 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
543
544
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
|
544
545
|
case WorkbenchState.EMPTY:
|
|
545
546
|
return localize(
|
|
546
|
-
|
|
547
|
+
15181,
|
|
547
548
|
"Restricted Mode is intended for safe code browsing. Trust this window to enable all features. Use navigation keys to access banner actions."
|
|
548
549
|
);
|
|
549
550
|
case WorkbenchState.FOLDER:
|
|
550
551
|
return localize(
|
|
551
|
-
|
|
552
|
+
15182,
|
|
552
553
|
"Restricted Mode is intended for safe code browsing. Trust this folder to enable all features. Use navigation keys to access banner actions."
|
|
553
554
|
);
|
|
554
555
|
case WorkbenchState.WORKSPACE:
|
|
555
556
|
return localize(
|
|
556
|
-
|
|
557
|
+
15183,
|
|
557
558
|
"Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features. Use navigation keys to access banner actions."
|
|
558
559
|
);
|
|
559
560
|
}
|
|
@@ -562,17 +563,17 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
562
563
|
switch (this.workspaceContextService.getWorkbenchState()) {
|
|
563
564
|
case WorkbenchState.EMPTY:
|
|
564
565
|
return localize(
|
|
565
|
-
|
|
566
|
+
15184,
|
|
566
567
|
"Restricted Mode is intended for safe code browsing. Trust this window to enable all features."
|
|
567
568
|
);
|
|
568
569
|
case WorkbenchState.FOLDER:
|
|
569
570
|
return localize(
|
|
570
|
-
|
|
571
|
+
15185,
|
|
571
572
|
"Restricted Mode is intended for safe code browsing. Trust this folder to enable all features."
|
|
572
573
|
);
|
|
573
574
|
case WorkbenchState.WORKSPACE:
|
|
574
575
|
return localize(
|
|
575
|
-
|
|
576
|
+
15186,
|
|
576
577
|
"Restricted Mode is intended for safe code browsing. Trust this workspace to enable all features."
|
|
577
578
|
);
|
|
578
579
|
}
|
|
@@ -591,12 +592,12 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
591
592
|
case WorkbenchState.EMPTY:
|
|
592
593
|
{
|
|
593
594
|
ariaLabel = ( localize(
|
|
594
|
-
|
|
595
|
+
15187,
|
|
595
596
|
"Restricted Mode: Some features are disabled because this window is not trusted."
|
|
596
597
|
));
|
|
597
598
|
toolTip = {
|
|
598
599
|
value: ( localize(
|
|
599
|
-
|
|
600
|
+
15188,
|
|
600
601
|
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [window is not trusted]({1}).",
|
|
601
602
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
|
|
602
603
|
`command:${MANAGE_TRUST_COMMAND_ID}`
|
|
@@ -609,12 +610,12 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
609
610
|
case WorkbenchState.FOLDER:
|
|
610
611
|
{
|
|
611
612
|
ariaLabel = ( localize(
|
|
612
|
-
|
|
613
|
+
15189,
|
|
613
614
|
"Restricted Mode: Some features are disabled because this folder is not trusted."
|
|
614
615
|
));
|
|
615
616
|
toolTip = {
|
|
616
617
|
value: ( localize(
|
|
617
|
-
|
|
618
|
+
15190,
|
|
618
619
|
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [folder is not trusted]({1}).",
|
|
619
620
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
|
|
620
621
|
`command:${MANAGE_TRUST_COMMAND_ID}`
|
|
@@ -627,12 +628,12 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
627
628
|
case WorkbenchState.WORKSPACE:
|
|
628
629
|
{
|
|
629
630
|
ariaLabel = ( localize(
|
|
630
|
-
|
|
631
|
+
15191,
|
|
631
632
|
"Restricted Mode: Some features are disabled because this workspace is not trusted."
|
|
632
633
|
));
|
|
633
634
|
toolTip = {
|
|
634
635
|
value: ( localize(
|
|
635
|
-
|
|
636
|
+
15192,
|
|
636
637
|
"Running in Restricted Mode\n\nSome [features are disabled]({0}) because this [workspace is not trusted]({1}).",
|
|
637
638
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`,
|
|
638
639
|
`command:${MANAGE_TRUST_COMMAND_ID}`
|
|
@@ -644,8 +645,8 @@ let WorkspaceTrustUXHandler = class WorkspaceTrustUXHandler extends Disposable {
|
|
|
644
645
|
}
|
|
645
646
|
}
|
|
646
647
|
return {
|
|
647
|
-
name: ( localize(
|
|
648
|
-
text: `$(shield) ${( localize(
|
|
648
|
+
name: ( localize(15193, "Workspace Trust")),
|
|
649
|
+
text: `$(shield) ${( localize(15194, "Restricted Mode"))}`,
|
|
649
650
|
ariaLabel: ariaLabel,
|
|
650
651
|
tooltip: toolTip,
|
|
651
652
|
command: MANAGE_TRUST_COMMAND_ID,
|
|
@@ -689,16 +690,16 @@ class WorkspaceTrustEditorInputSerializer {
|
|
|
689
690
|
}
|
|
690
691
|
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(WorkspaceTrustEditorInput.ID, WorkspaceTrustEditorInputSerializer);
|
|
691
692
|
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
|
|
692
|
-
EditorPaneDescriptor.create(WorkspaceTrustEditor, WorkspaceTrustEditor.ID, ( localize(
|
|
693
|
+
EditorPaneDescriptor.create(WorkspaceTrustEditor, WorkspaceTrustEditor.ID, ( localize(15195, "Workspace Trust Editor"))),
|
|
693
694
|
[( new SyncDescriptor(WorkspaceTrustEditorInput))]
|
|
694
695
|
);
|
|
695
696
|
const CONFIGURE_TRUST_COMMAND_ID = "workbench.trust.configure";
|
|
696
|
-
const WORKSPACES_CATEGORY = ( localize2(
|
|
697
|
+
const WORKSPACES_CATEGORY = ( localize2(15196, "Workspaces"));
|
|
697
698
|
registerAction2(class extends Action2 {
|
|
698
699
|
constructor() {
|
|
699
700
|
super({
|
|
700
701
|
id: CONFIGURE_TRUST_COMMAND_ID,
|
|
701
|
-
title: ( localize2(
|
|
702
|
+
title: ( localize2(15197, "Configure Workspace Trust Settings")),
|
|
702
703
|
precondition: ( ContextKeyExpr.and(WorkspaceTrustContext.IsEnabled, ( ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true)))),
|
|
703
704
|
category: WORKSPACES_CATEGORY,
|
|
704
705
|
f1: true
|
|
@@ -715,7 +716,7 @@ registerAction2(class extends Action2 {
|
|
|
715
716
|
constructor() {
|
|
716
717
|
super({
|
|
717
718
|
id: MANAGE_TRUST_COMMAND_ID,
|
|
718
|
-
title: ( localize2(
|
|
719
|
+
title: ( localize2(15198, "Manage Workspace Trust")),
|
|
719
720
|
precondition: ( ContextKeyExpr.and(WorkspaceTrustContext.IsEnabled, ( ContextKeyExpr.equals(`config.${WORKSPACE_TRUST_ENABLED}`, true)))),
|
|
720
721
|
category: WORKSPACES_CATEGORY,
|
|
721
722
|
f1: true
|
|
@@ -727,7 +728,7 @@ registerAction2(class extends Action2 {
|
|
|
727
728
|
const input = instantiationService.createInstance(WorkspaceTrustEditorInput);
|
|
728
729
|
editorService.openEditor(input, {
|
|
729
730
|
pinned: true
|
|
730
|
-
});
|
|
731
|
+
}, MODAL_GROUP);
|
|
731
732
|
return;
|
|
732
733
|
}
|
|
733
734
|
});
|
|
@@ -738,7 +739,7 @@ registerAction2(class extends Action2 {
|
|
|
738
739
|
type: "boolean",
|
|
739
740
|
default: true,
|
|
740
741
|
description: ( localize(
|
|
741
|
-
|
|
742
|
+
15199,
|
|
742
743
|
"Controls whether or not Workspace Trust is enabled within VS Code."
|
|
743
744
|
)),
|
|
744
745
|
tags: [WORKSPACE_TRUST_SETTING_TAG],
|
|
@@ -747,29 +748,29 @@ registerAction2(class extends Action2 {
|
|
|
747
748
|
[WORKSPACE_TRUST_STARTUP_PROMPT]: {
|
|
748
749
|
type: "string",
|
|
749
750
|
default: "once",
|
|
750
|
-
description: ( localize(
|
|
751
|
+
description: ( localize(15200, "Controls when the startup prompt to trust a workspace is shown.")),
|
|
751
752
|
tags: [WORKSPACE_TRUST_SETTING_TAG],
|
|
752
753
|
scope: ConfigurationScope.APPLICATION,
|
|
753
754
|
enum: ["always", "once", "never"],
|
|
754
|
-
enumDescriptions: [( localize(
|
|
755
|
+
enumDescriptions: [( localize(15201, "Ask for trust every time an untrusted workspace is opened.")), ( localize(15202, "Ask for trust the first time an untrusted workspace is opened.")), ( localize(15203, "Do not ask for trust when an untrusted workspace is opened."))]
|
|
755
756
|
},
|
|
756
757
|
[WORKSPACE_TRUST_BANNER]: {
|
|
757
758
|
type: "string",
|
|
758
759
|
default: "untilDismissed",
|
|
759
|
-
description: ( localize(
|
|
760
|
+
description: ( localize(15204, "Controls when the restricted mode banner is shown.")),
|
|
760
761
|
tags: [WORKSPACE_TRUST_SETTING_TAG],
|
|
761
762
|
scope: ConfigurationScope.APPLICATION,
|
|
762
763
|
enum: ["always", "untilDismissed", "never"],
|
|
763
|
-
enumDescriptions: [( localize(
|
|
764
|
-
|
|
764
|
+
enumDescriptions: [( localize(15205, "Show the banner every time an untrusted workspace is open.")), ( localize(
|
|
765
|
+
15206,
|
|
765
766
|
"Show the banner when an untrusted workspace is opened until dismissed."
|
|
766
|
-
)), ( localize(
|
|
767
|
+
)), ( localize(15207, "Do not show the banner when an untrusted workspace is open."))]
|
|
767
768
|
},
|
|
768
769
|
[WORKSPACE_TRUST_UNTRUSTED_FILES]: {
|
|
769
770
|
type: "string",
|
|
770
771
|
default: "prompt",
|
|
771
772
|
markdownDescription: ( localize(
|
|
772
|
-
|
|
773
|
+
15208,
|
|
773
774
|
"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}#`.",
|
|
774
775
|
WORKSPACE_TRUST_EMPTY_WINDOW
|
|
775
776
|
)),
|
|
@@ -777,13 +778,13 @@ registerAction2(class extends Action2 {
|
|
|
777
778
|
scope: ConfigurationScope.APPLICATION,
|
|
778
779
|
enum: ["prompt", "open", "newWindow"],
|
|
779
780
|
enumDescriptions: [( localize(
|
|
780
|
-
|
|
781
|
+
15209,
|
|
781
782
|
"Ask how to handle untrusted files for each workspace. Once untrusted files are introduced to a trusted workspace, you will not be prompted again."
|
|
782
783
|
)), ( localize(
|
|
783
|
-
|
|
784
|
+
15210,
|
|
784
785
|
"Always allow untrusted files to be introduced to a trusted workspace without prompting."
|
|
785
786
|
)), ( localize(
|
|
786
|
-
|
|
787
|
+
15211,
|
|
787
788
|
"Always open untrusted files in a separate window in restricted mode without prompting."
|
|
788
789
|
))]
|
|
789
790
|
},
|
|
@@ -791,7 +792,7 @@ registerAction2(class extends Action2 {
|
|
|
791
792
|
type: "boolean",
|
|
792
793
|
default: true,
|
|
793
794
|
markdownDescription: ( localize(
|
|
794
|
-
|
|
795
|
+
15212,
|
|
795
796
|
"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.",
|
|
796
797
|
WORKSPACE_TRUST_UNTRUSTED_FILES
|
|
797
798
|
)),
|
|
@@ -66,12 +66,12 @@ import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
66
66
|
import { basename, dirname } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
67
67
|
|
|
68
68
|
var TrustedUriActionsColumnRenderer_1, TrustedUriPathColumnRenderer_1, TrustedUriHostColumnRenderer_1, WorkspaceTrustEditor_1;
|
|
69
|
-
const shieldIcon = registerIcon("workspace-trust-banner", Codicon.shield, ( localize(
|
|
70
|
-
const checkListIcon = registerIcon("workspace-trust-editor-check", Codicon.check, ( localize(
|
|
71
|
-
const xListIcon = registerIcon("workspace-trust-editor-cross", Codicon.x, ( localize(
|
|
72
|
-
const folderPickerIcon = registerIcon("workspace-trust-editor-folder-picker", Codicon.folder, ( localize(
|
|
73
|
-
const editIcon = registerIcon("workspace-trust-editor-edit-folder", Codicon.edit, ( localize(
|
|
74
|
-
const removeIcon = registerIcon("workspace-trust-editor-remove-folder", Codicon.close, ( localize(
|
|
69
|
+
const shieldIcon = registerIcon("workspace-trust-banner", Codicon.shield, ( localize(15213, "Icon for workspace trust ion the banner.")));
|
|
70
|
+
const checkListIcon = registerIcon("workspace-trust-editor-check", Codicon.check, ( localize(15214, "Icon for the checkmark in the workspace trust editor.")));
|
|
71
|
+
const xListIcon = registerIcon("workspace-trust-editor-cross", Codicon.x, ( localize(15215, "Icon for the cross in the workspace trust editor.")));
|
|
72
|
+
const folderPickerIcon = registerIcon("workspace-trust-editor-folder-picker", Codicon.folder, ( localize(15216, "Icon for the pick folder icon in the workspace trust editor.")));
|
|
73
|
+
const editIcon = registerIcon("workspace-trust-editor-edit-folder", Codicon.edit, ( localize(15217, "Icon for the edit folder icon in the workspace trust editor.")));
|
|
74
|
+
const removeIcon = registerIcon("workspace-trust-editor-remove-folder", Codicon.close, ( localize(15218, "Icon for the remove folder icon in the workspace trust editor.")));
|
|
75
75
|
let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposable {
|
|
76
76
|
constructor(
|
|
77
77
|
container,
|
|
@@ -102,7 +102,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
102
102
|
const tableElement = container.appendChild($(".trusted-uris-table"));
|
|
103
103
|
const addButtonBarElement = container.appendChild($(".trusted-uris-button-bar"));
|
|
104
104
|
this.table = this.instantiationService.createInstance(WorkbenchTable, "WorkspaceTrust", tableElement, ( new TrustedUriTableVirtualDelegate()), [{
|
|
105
|
-
label: ( localize(
|
|
105
|
+
label: ( localize(15219, "Host")),
|
|
106
106
|
tooltip: "",
|
|
107
107
|
weight: 1,
|
|
108
108
|
templateId: TrustedUriHostColumnRenderer.TEMPLATE_ID,
|
|
@@ -110,7 +110,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
110
110
|
return row;
|
|
111
111
|
}
|
|
112
112
|
}, {
|
|
113
|
-
label: ( localize(
|
|
113
|
+
label: ( localize(15220, "Path")),
|
|
114
114
|
tooltip: "",
|
|
115
115
|
weight: 8,
|
|
116
116
|
templateId: TrustedUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -140,16 +140,16 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
140
140
|
getAriaLabel: item => {
|
|
141
141
|
const hostLabel = getHostLabel(this.labelService, item);
|
|
142
142
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
143
|
-
return localize(
|
|
143
|
+
return localize(15221, "{0}, trusted", this.labelService.getUriLabel(item.uri));
|
|
144
144
|
}
|
|
145
145
|
return localize(
|
|
146
|
-
|
|
146
|
+
15222,
|
|
147
147
|
"{0} on {1}, trusted",
|
|
148
148
|
this.labelService.getUriLabel(item.uri),
|
|
149
149
|
hostLabel
|
|
150
150
|
);
|
|
151
151
|
},
|
|
152
|
-
getWidgetAriaLabel: () => ( localize(
|
|
152
|
+
getWidgetAriaLabel: () => ( localize(15223, "Trusted Folders & Workspaces"))
|
|
153
153
|
},
|
|
154
154
|
identityProvider: {
|
|
155
155
|
getId(element) {
|
|
@@ -164,18 +164,18 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
164
164
|
}));
|
|
165
165
|
const buttonBar = this._register(( new ButtonBar(addButtonBarElement)));
|
|
166
166
|
const addButton = this._register(buttonBar.addButton({
|
|
167
|
-
title: ( localize(
|
|
167
|
+
title: ( localize(15224, "Add Folder")),
|
|
168
168
|
...defaultButtonStyles
|
|
169
169
|
}));
|
|
170
|
-
addButton.label = ( localize(
|
|
170
|
+
addButton.label = ( localize(15224, "Add Folder"));
|
|
171
171
|
this._register(addButton.onDidClick(async () => {
|
|
172
172
|
const uri = await this.fileDialogService.showOpenDialog({
|
|
173
173
|
canSelectFiles: false,
|
|
174
174
|
canSelectFolders: true,
|
|
175
175
|
canSelectMany: false,
|
|
176
176
|
defaultUri: this.currentWorkspaceUri,
|
|
177
|
-
openLabel: ( localize(
|
|
178
|
-
title: ( localize(
|
|
177
|
+
openLabel: ( localize(15225, "Trust Folder")),
|
|
178
|
+
title: ( localize(15226, "Select Folder To Trust"))
|
|
179
179
|
});
|
|
180
180
|
if (uri) {
|
|
181
181
|
this.workspaceTrustManagementService.setUrisTrust(uri, true);
|
|
@@ -258,9 +258,9 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
258
258
|
const entries = this.trustedUriEntries;
|
|
259
259
|
this.container.classList.toggle("empty", entries.length === 0);
|
|
260
260
|
this.descriptionElement.innerText = entries.length ? ( localize(
|
|
261
|
-
|
|
261
|
+
15227,
|
|
262
262
|
"You trust the following folders, their subfolders, and workspace files."
|
|
263
|
-
)) : ( localize(
|
|
263
|
+
)) : ( localize(15228, "You haven't trusted any folders or workspace files yet."));
|
|
264
264
|
this.table.splice(0, Number.POSITIVE_INFINITY, this.trustedUriEntries);
|
|
265
265
|
this.layout();
|
|
266
266
|
}
|
|
@@ -274,7 +274,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
274
274
|
return {
|
|
275
275
|
type: MessageType.WARNING,
|
|
276
276
|
content: ( localize(
|
|
277
|
-
|
|
277
|
+
15229,
|
|
278
278
|
"You will trust all repositories on {0}.",
|
|
279
279
|
getHostLabel(this.labelService, item)
|
|
280
280
|
))
|
|
@@ -284,7 +284,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
284
284
|
return {
|
|
285
285
|
type: MessageType.WARNING,
|
|
286
286
|
content: ( localize(
|
|
287
|
-
|
|
287
|
+
15230,
|
|
288
288
|
"You will trust all repositories and forks under '{0}' on {1}.",
|
|
289
289
|
segments[0],
|
|
290
290
|
getHostLabel(this.labelService, item)
|
|
@@ -294,7 +294,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
294
294
|
if (segments.length > 2) {
|
|
295
295
|
return {
|
|
296
296
|
type: MessageType.ERROR,
|
|
297
|
-
content: ( localize(
|
|
297
|
+
content: ( localize(15231, "You cannot trust individual folders within a repository.", path))
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
300
|
}
|
|
@@ -331,8 +331,8 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
331
331
|
canSelectFolders: true,
|
|
332
332
|
canSelectMany: false,
|
|
333
333
|
defaultUri: item.uri,
|
|
334
|
-
openLabel: ( localize(
|
|
335
|
-
title: ( localize(
|
|
334
|
+
openLabel: ( localize(15225, "Trust Folder")),
|
|
335
|
+
title: ( localize(15226, "Select Folder To Trust"))
|
|
336
336
|
});
|
|
337
337
|
if (uri) {
|
|
338
338
|
this.acceptEdit(item, uri[0]);
|
|
@@ -399,7 +399,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
399
399
|
class: ThemeIcon.asClassName(editIcon),
|
|
400
400
|
enabled: true,
|
|
401
401
|
id: "editTrustedUri",
|
|
402
|
-
tooltip: ( localize(
|
|
402
|
+
tooltip: ( localize(15232, "Edit Path")),
|
|
403
403
|
run: () => {
|
|
404
404
|
this.table.edit(item, false);
|
|
405
405
|
}
|
|
@@ -411,7 +411,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
411
411
|
class: ThemeIcon.asClassName(folderPickerIcon),
|
|
412
412
|
enabled: true,
|
|
413
413
|
id: "pickerTrustedUri",
|
|
414
|
-
tooltip: ( localize(
|
|
414
|
+
tooltip: ( localize(15233, "Open File Picker")),
|
|
415
415
|
run: () => {
|
|
416
416
|
this.table.edit(item, true);
|
|
417
417
|
}
|
|
@@ -423,7 +423,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
423
423
|
class: ThemeIcon.asClassName(removeIcon),
|
|
424
424
|
enabled: true,
|
|
425
425
|
id: "deleteTrustedUri",
|
|
426
|
-
tooltip: ( localize(
|
|
426
|
+
tooltip: ( localize(15234, "Delete Path")),
|
|
427
427
|
run: async () => {
|
|
428
428
|
await this.table.delete(item);
|
|
429
429
|
}
|
|
@@ -549,7 +549,7 @@ let TrustedUriPathColumnRenderer = class TrustedUriPathColumnRenderer {
|
|
|
549
549
|
};
|
|
550
550
|
TrustedUriPathColumnRenderer = TrustedUriPathColumnRenderer_1 = ( __decorate([( __param(1, IContextViewService))], TrustedUriPathColumnRenderer));
|
|
551
551
|
function getHostLabel(labelService, item) {
|
|
552
|
-
return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localize(
|
|
552
|
+
return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localize(15235, "Local"));
|
|
553
553
|
}
|
|
554
554
|
let TrustedUriHostColumnRenderer = class TrustedUriHostColumnRenderer {
|
|
555
555
|
static {
|
|
@@ -722,18 +722,18 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
722
722
|
getHeaderTitleText(trusted) {
|
|
723
723
|
if (trusted) {
|
|
724
724
|
if (this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
|
|
725
|
-
return localize(
|
|
725
|
+
return localize(15236, "This window is trusted");
|
|
726
726
|
}
|
|
727
727
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
728
728
|
case WorkbenchState.EMPTY:
|
|
729
|
-
return localize(
|
|
729
|
+
return localize(15237, "You trust this window");
|
|
730
730
|
case WorkbenchState.FOLDER:
|
|
731
|
-
return localize(
|
|
731
|
+
return localize(15238, "You trust this folder");
|
|
732
732
|
case WorkbenchState.WORKSPACE:
|
|
733
|
-
return localize(
|
|
733
|
+
return localize(15239, "You trust this workspace");
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
return localize(
|
|
736
|
+
return localize(15240, "You are in Restricted Mode");
|
|
737
737
|
}
|
|
738
738
|
getHeaderTitleIconClassNames(trusted) {
|
|
739
739
|
return ThemeIcon.asClassNameArray(shieldIcon);
|
|
@@ -744,36 +744,36 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
744
744
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
745
745
|
case WorkbenchState.EMPTY:
|
|
746
746
|
{
|
|
747
|
-
title = trusted ? ( localize(
|
|
747
|
+
title = trusted ? ( localize(15241, "In a Trusted Window")) : ( localize(15242, "In Restricted Mode"));
|
|
748
748
|
subTitle = trusted ? ( localize(
|
|
749
|
-
|
|
749
|
+
15243,
|
|
750
750
|
"You trust the authors of the files in the current window. All features are enabled:"
|
|
751
751
|
)) : ( localize(
|
|
752
|
-
|
|
752
|
+
15244,
|
|
753
753
|
"You do not trust the authors of the files in the current window. The following features are disabled:"
|
|
754
754
|
));
|
|
755
755
|
break;
|
|
756
756
|
}
|
|
757
757
|
case WorkbenchState.FOLDER:
|
|
758
758
|
{
|
|
759
|
-
title = trusted ? ( localize(
|
|
759
|
+
title = trusted ? ( localize(15245, "In a Trusted Folder")) : ( localize(15242, "In Restricted Mode"));
|
|
760
760
|
subTitle = trusted ? ( localize(
|
|
761
|
-
|
|
761
|
+
15246,
|
|
762
762
|
"You trust the authors of the files in the current folder. All features are enabled:"
|
|
763
763
|
)) : ( localize(
|
|
764
|
-
|
|
764
|
+
15247,
|
|
765
765
|
"You do not trust the authors of the files in the current folder. The following features are disabled:"
|
|
766
766
|
));
|
|
767
767
|
break;
|
|
768
768
|
}
|
|
769
769
|
case WorkbenchState.WORKSPACE:
|
|
770
770
|
{
|
|
771
|
-
title = trusted ? ( localize(
|
|
771
|
+
title = trusted ? ( localize(15248, "In a Trusted Workspace")) : ( localize(15242, "In Restricted Mode"));
|
|
772
772
|
subTitle = trusted ? ( localize(
|
|
773
|
-
|
|
773
|
+
15249,
|
|
774
774
|
"You trust the authors of the files in the current workspace. All features are enabled:"
|
|
775
775
|
)) : ( localize(
|
|
776
|
-
|
|
776
|
+
15250,
|
|
777
777
|
"You do not trust the authors of the files in the current workspace. The following features are disabled:"
|
|
778
778
|
));
|
|
779
779
|
break;
|
|
@@ -796,16 +796,16 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
796
796
|
this.headerDescription.innerText = "";
|
|
797
797
|
const headerDescriptionText = append(this.headerDescription, $("div"));
|
|
798
798
|
headerDescriptionText.innerText = isWorkspaceTrusted ? ( localize(
|
|
799
|
-
|
|
799
|
+
15251,
|
|
800
800
|
"All features are enabled because trust has been granted to the workspace."
|
|
801
801
|
)) : ( localize(
|
|
802
|
-
|
|
802
|
+
15252,
|
|
803
803
|
"{0} is in a restricted mode intended for safe code browsing.",
|
|
804
804
|
this.productService.nameShort
|
|
805
805
|
));
|
|
806
806
|
const headerDescriptionActions = append(this.headerDescription, $("div"));
|
|
807
807
|
const headerDescriptionActionsText = ( localize(
|
|
808
|
-
|
|
808
|
+
15253,
|
|
809
809
|
"[Configure your settings]({0}) or [learn more](https://aka.ms/vscode-workspace-trust).",
|
|
810
810
|
`command:workbench.trust.configure`
|
|
811
811
|
));
|
|
@@ -820,7 +820,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
this.headerContainer.className = this.getHeaderContainerClass(isWorkspaceTrusted);
|
|
823
|
-
this.rootElement.setAttribute("aria-label", `${( localize(
|
|
823
|
+
this.rootElement.setAttribute("aria-label", `${( localize(15254, "Manage Workspace Trust"))}: ${this.headerContainer.innerText}`);
|
|
824
824
|
const restrictedSettings = this.configurationService.restrictedSettings;
|
|
825
825
|
const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
826
826
|
const settingsRequiringTrustedWorkspaceCount = restrictedSettings.default.filter(key => {
|
|
@@ -888,7 +888,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
888
888
|
tabIndex: "0"
|
|
889
889
|
}));
|
|
890
890
|
const configurationTitle = append(this.configurationContainer, $(".workspace-trusted-folders-title"));
|
|
891
|
-
configurationTitle.innerText = ( localize(
|
|
891
|
+
configurationTitle.innerText = ( localize(15223, "Trusted Folders & Workspaces"));
|
|
892
892
|
this.workspaceTrustedUrisTable = this._register(
|
|
893
893
|
this.instantiationService.createInstance(WorkspaceTrustedUrisTable, this.configurationContainer)
|
|
894
894
|
);
|
|
@@ -913,7 +913,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
913
913
|
clearNode(this.untrustedContainer);
|
|
914
914
|
const [trustedTitle, trustedSubTitle] = this.getFeaturesHeaderText(true);
|
|
915
915
|
this.renderLimitationsHeaderElement(this.trustedContainer, trustedTitle, trustedSubTitle);
|
|
916
|
-
const trustedContainerItems = this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY ? [( localize(
|
|
916
|
+
const trustedContainerItems = this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY ? [( localize(15255, "Tasks are allowed to run")), ( localize(15256, "Debugging is enabled")), ( localize(15257, "All enabled extensions are activated"))] : [( localize(15255, "Tasks are allowed to run")), ( localize(15256, "Debugging is enabled")), ( localize(15258, "All workspace settings are applied")), ( localize(15257, "All enabled extensions are activated"))];
|
|
917
917
|
this.renderLimitationsListElement(
|
|
918
918
|
this.trustedContainer,
|
|
919
919
|
trustedContainerItems,
|
|
@@ -921,18 +921,18 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
921
921
|
);
|
|
922
922
|
const [untrustedTitle, untrustedSubTitle] = this.getFeaturesHeaderText(false);
|
|
923
923
|
this.renderLimitationsHeaderElement(this.untrustedContainer, untrustedTitle, untrustedSubTitle);
|
|
924
|
-
const untrustedContainerItems = this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY ? [( localize(
|
|
925
|
-
|
|
924
|
+
const untrustedContainerItems = this.workspaceService.getWorkbenchState() === WorkbenchState.EMPTY ? [( localize(15259, "Tasks are not allowed to run")), ( localize(15260, "Debugging is disabled")), fixBadLocalizedLinks(( localize(
|
|
925
|
+
15261,
|
|
926
926
|
"[{0} extensions]({1}) are disabled or have limited functionality",
|
|
927
927
|
numExtensions,
|
|
928
928
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
|
|
929
|
-
)))] : [( localize(
|
|
930
|
-
|
|
929
|
+
)))] : [( localize(15259, "Tasks are not allowed to run")), ( localize(15260, "Debugging is disabled")), fixBadLocalizedLinks(numSettings ? ( localize(
|
|
930
|
+
15262,
|
|
931
931
|
"[{0} workspace settings]({1}) are not applied",
|
|
932
932
|
numSettings,
|
|
933
933
|
"command:settings.filterUntrusted"
|
|
934
|
-
)) : ( localize(
|
|
935
|
-
|
|
934
|
+
)) : ( localize(15263, "Workspace settings requiring trust are not applied"))), fixBadLocalizedLinks(( localize(
|
|
935
|
+
15261,
|
|
936
936
|
"[{0} extensions]({1}) are disabled or have limited functionality",
|
|
937
937
|
numExtensions,
|
|
938
938
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
|
|
@@ -966,7 +966,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
966
966
|
button.label = action.label;
|
|
967
967
|
button.enabled = enabled !== undefined ? enabled : action.enabled;
|
|
968
968
|
button.description = keybinding.getLabel();
|
|
969
|
-
button.element.ariaLabel = action.label + ", " + ( localize(
|
|
969
|
+
button.element.ariaLabel = action.label + ", " + ( localize(15264, "Keyboard Shortcut: {0}", keybinding.getAriaLabel()));
|
|
970
970
|
this.rerenderDisposables.add(button.onDidClick(e => {
|
|
971
971
|
if (e) {
|
|
972
972
|
EventHelper.stop(e, true);
|
|
@@ -976,7 +976,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
addTrustButtonToElement(parent) {
|
|
979
|
-
const trustAction = this.rerenderDisposables.add(( new Action("workspace.trust.button.action.grant", ( localize(
|
|
979
|
+
const trustAction = this.rerenderDisposables.add(( new Action("workspace.trust.button.action.grant", ( localize(15265, "Trust")), undefined, true, async () => {
|
|
980
980
|
await this.workspaceTrustManagementService.setWorkspaceTrust(true);
|
|
981
981
|
})));
|
|
982
982
|
const trustActions = [{
|
|
@@ -988,11 +988,11 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
988
988
|
const name = basename(dirname(workspaceIdentifier.uri));
|
|
989
989
|
const trustMessageElement = append(parent, $(".trust-message-box"));
|
|
990
990
|
trustMessageElement.innerText = ( localize(
|
|
991
|
-
|
|
991
|
+
15266,
|
|
992
992
|
"Trust the authors of all files in the current folder or its parent '{0}'.",
|
|
993
993
|
name
|
|
994
994
|
));
|
|
995
|
-
const trustParentAction = this.rerenderDisposables.add(( new Action("workspace.trust.button.action.grantParent", ( localize(
|
|
995
|
+
const trustParentAction = this.rerenderDisposables.add(( new Action("workspace.trust.button.action.grantParent", ( localize(15267, "Trust Parent")), undefined, true, async () => {
|
|
996
996
|
await this.workspaceTrustManagementService.setParentFolderTrust(true);
|
|
997
997
|
})));
|
|
998
998
|
trustActions.push({
|
|
@@ -1004,7 +1004,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
addDontTrustButtonToElement(parent) {
|
|
1006
1006
|
this.createButtonRow(parent, [{
|
|
1007
|
-
action: this.rerenderDisposables.add(( new Action("workspace.trust.button.action.deny", ( localize(
|
|
1007
|
+
action: this.rerenderDisposables.add(( new Action("workspace.trust.button.action.deny", ( localize(15268, "Don't Trust")), undefined, true, async () => {
|
|
1008
1008
|
await this.workspaceTrustManagementService.setWorkspaceTrust(false);
|
|
1009
1009
|
}))),
|
|
1010
1010
|
keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? "Cmd+Enter" : "Ctrl+Enter")[0]
|
|
@@ -1017,14 +1017,14 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
1017
1017
|
const textElement = append(parent, $(".workspace-trust-untrusted-description"));
|
|
1018
1018
|
if (!this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
|
|
1019
1019
|
textElement.innerText = this.workspaceService.getWorkbenchState() === WorkbenchState.WORKSPACE ? ( localize(
|
|
1020
|
-
|
|
1020
|
+
15269,
|
|
1021
1021
|
"This workspace is trusted via the bolded entries in the trusted folders below."
|
|
1022
1022
|
)) : ( localize(
|
|
1023
|
-
|
|
1023
|
+
15270,
|
|
1024
1024
|
"This folder is trusted via the bolded entries in the trusted folders below."
|
|
1025
1025
|
));
|
|
1026
1026
|
} else {
|
|
1027
|
-
textElement.innerText = ( localize(
|
|
1027
|
+
textElement.innerText = ( localize(15271, "This window is trusted by nature of the workspace that is opened."));
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
renderLimitationsHeaderElement(parent, headerText, subtitleText) {
|
|
@@ -7,7 +7,7 @@ import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/th
|
|
|
7
7
|
import { EditorInputCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
8
8
|
import { EditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput';
|
|
9
9
|
|
|
10
|
-
const WorkspaceTrustEditorIcon = registerIcon("workspace-trust-editor-label-icon", Codicon.shield, ( localize(
|
|
10
|
+
const WorkspaceTrustEditorIcon = registerIcon("workspace-trust-editor-label-icon", Codicon.shield, ( localize(16377, "Icon of the workspace trust editor label.")));
|
|
11
11
|
class WorkspaceTrustEditorInput extends EditorInput {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
@@ -29,7 +29,7 @@ class WorkspaceTrustEditorInput extends EditorInput {
|
|
|
29
29
|
return super.matches(otherInput) || otherInput instanceof WorkspaceTrustEditorInput;
|
|
30
30
|
}
|
|
31
31
|
getName() {
|
|
32
|
-
return localize(
|
|
32
|
+
return localize(16378, "Workspace Trust");
|
|
33
33
|
}
|
|
34
34
|
getIcon() {
|
|
35
35
|
return WorkspaceTrustEditorIcon;
|