@codingame/monaco-vscode-workspace-trust-service-override 4.5.0 → 4.5.2
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/index.d.ts +1 -1
- package/package.json +2 -2
- package/vscode/src/vs/platform/workspace/common/workspaceTrust.js +3 -6
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspace.contribution.js +161 -282
- package/vscode/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.js +159 -346
- package/vscode/src/vs/workbench/services/workspaces/browser/workspaceTrustEditorInput.js +5 -12
- package/workspaceTrust.d.ts +0 -5
|
@@ -61,34 +61,23 @@ 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
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
)));
|
|
69
|
-
const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, ( localizeWithPath(
|
|
70
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
71
|
-
'checkListIcon',
|
|
72
|
-
'Icon for the checkmark in the workspace trust editor.'
|
|
73
|
-
)));
|
|
74
|
-
const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, ( localizeWithPath(
|
|
75
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
76
|
-
'xListIcon',
|
|
77
|
-
'Icon for the cross in the workspace trust editor.'
|
|
78
|
-
)));
|
|
64
|
+
const _moduleId = "vs/workbench/contrib/workspace/browser/workspaceTrustEditor";
|
|
65
|
+
const shieldIcon = registerIcon('workspace-trust-banner', Codicon.shield, ( localizeWithPath(_moduleId, 0, 'Icon for workspace trust ion the banner.')));
|
|
66
|
+
const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, ( localizeWithPath(_moduleId, 1, 'Icon for the checkmark in the workspace trust editor.')));
|
|
67
|
+
const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, ( localizeWithPath(_moduleId, 2, 'Icon for the cross in the workspace trust editor.')));
|
|
79
68
|
const folderPickerIcon = registerIcon('workspace-trust-editor-folder-picker', Codicon.folder, ( localizeWithPath(
|
|
80
|
-
|
|
81
|
-
|
|
69
|
+
_moduleId,
|
|
70
|
+
3,
|
|
82
71
|
'Icon for the pick folder icon in the workspace trust editor.'
|
|
83
72
|
)));
|
|
84
73
|
const editIcon = registerIcon('workspace-trust-editor-edit-folder', Codicon.edit, ( localizeWithPath(
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
_moduleId,
|
|
75
|
+
4,
|
|
87
76
|
'Icon for the edit folder icon in the workspace trust editor.'
|
|
88
77
|
)));
|
|
89
78
|
const removeIcon = registerIcon('workspace-trust-editor-remove-folder', Codicon.close, ( localizeWithPath(
|
|
90
|
-
|
|
91
|
-
|
|
79
|
+
_moduleId,
|
|
80
|
+
5,
|
|
92
81
|
'Icon for the remove folder icon in the workspace trust editor.'
|
|
93
82
|
)));
|
|
94
83
|
let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposable {
|
|
@@ -101,35 +90,27 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
101
90
|
this.uriService = uriService;
|
|
102
91
|
this.labelService = labelService;
|
|
103
92
|
this.fileDialogService = fileDialogService;
|
|
104
|
-
this._onDidAcceptEdit = this._register(( new Emitter()));
|
|
93
|
+
this._onDidAcceptEdit = this._register(( (new Emitter())));
|
|
105
94
|
this.onDidAcceptEdit = this._onDidAcceptEdit.event;
|
|
106
|
-
this._onDidRejectEdit = this._register(( new Emitter()));
|
|
95
|
+
this._onDidRejectEdit = this._register(( (new Emitter())));
|
|
107
96
|
this.onDidRejectEdit = this._onDidRejectEdit.event;
|
|
108
|
-
this._onEdit = this._register(( new Emitter()));
|
|
97
|
+
this._onEdit = this._register(( (new Emitter())));
|
|
109
98
|
this.onEdit = this._onEdit.event;
|
|
110
|
-
this._onDelete = this._register(( new Emitter()));
|
|
99
|
+
this._onDelete = this._register(( (new Emitter())));
|
|
111
100
|
this.onDelete = this._onDelete.event;
|
|
112
101
|
this.descriptionElement = container.appendChild($('.workspace-trusted-folders-description'));
|
|
113
102
|
const tableElement = container.appendChild($('.trusted-uris-table'));
|
|
114
103
|
const addButtonBarElement = container.appendChild($('.trusted-uris-button-bar'));
|
|
115
|
-
this.table = this.instantiationService.createInstance(WorkbenchTable, 'WorkspaceTrust', tableElement, ( new TrustedUriTableVirtualDelegate()), [
|
|
104
|
+
this.table = this.instantiationService.createInstance(WorkbenchTable, 'WorkspaceTrust', tableElement, ( (new TrustedUriTableVirtualDelegate())), [
|
|
116
105
|
{
|
|
117
|
-
label: ( localizeWithPath(
|
|
118
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
119
|
-
'hostColumnLabel',
|
|
120
|
-
"Host"
|
|
121
|
-
)),
|
|
106
|
+
label: ( localizeWithPath(_moduleId, 6, "Host")),
|
|
122
107
|
tooltip: '',
|
|
123
108
|
weight: 1,
|
|
124
109
|
templateId: TrustedUriHostColumnRenderer.TEMPLATE_ID,
|
|
125
110
|
project(row) { return row; }
|
|
126
111
|
},
|
|
127
112
|
{
|
|
128
|
-
label: ( localizeWithPath(
|
|
129
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
130
|
-
'pathColumnLabel',
|
|
131
|
-
"Path"
|
|
132
|
-
)),
|
|
113
|
+
label: ( localizeWithPath(_moduleId, 7, "Path")),
|
|
133
114
|
tooltip: '',
|
|
134
115
|
weight: 8,
|
|
135
116
|
templateId: TrustedUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -157,30 +138,23 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
157
138
|
getAriaLabel: (item) => {
|
|
158
139
|
const hostLabel = getHostLabel(this.labelService, item);
|
|
159
140
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
160
|
-
return ( localizeWithPath(
|
|
161
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
162
|
-
'trustedFolderAriaLabel',
|
|
163
|
-
"{0}, trusted",
|
|
164
|
-
this.labelService.getUriLabel(item.uri)
|
|
165
|
-
));
|
|
141
|
+
return ( localizeWithPath(_moduleId, 8, "{0}, trusted", this.labelService.getUriLabel(item.uri)));
|
|
166
142
|
}
|
|
167
143
|
return ( localizeWithPath(
|
|
168
|
-
|
|
169
|
-
|
|
144
|
+
_moduleId,
|
|
145
|
+
9,
|
|
170
146
|
"{0} on {1}, trusted",
|
|
171
147
|
this.labelService.getUriLabel(item.uri),
|
|
172
148
|
hostLabel
|
|
173
149
|
));
|
|
174
150
|
},
|
|
175
|
-
getWidgetAriaLabel: () => ( localizeWithPath(
|
|
176
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
177
|
-
'trustedFoldersAndWorkspaces',
|
|
178
|
-
"Trusted Folders & Workspaces"
|
|
179
|
-
))
|
|
151
|
+
getWidgetAriaLabel: () => ( localizeWithPath(_moduleId, 10, "Trusted Folders & Workspaces"))
|
|
180
152
|
},
|
|
181
153
|
identityProvider: {
|
|
182
154
|
getId(element) {
|
|
183
|
-
return (
|
|
155
|
+
return (
|
|
156
|
+
(element.uri.toString())
|
|
157
|
+
);
|
|
184
158
|
},
|
|
185
159
|
}
|
|
186
160
|
});
|
|
@@ -189,33 +163,17 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
189
163
|
this.edit(item.element, true);
|
|
190
164
|
}
|
|
191
165
|
}));
|
|
192
|
-
const buttonBar = this._register(( new ButtonBar(addButtonBarElement)));
|
|
193
|
-
const addButton = this._register(buttonBar.addButton({ title: ( localizeWithPath(
|
|
194
|
-
|
|
195
|
-
'addButton',
|
|
196
|
-
"Add Folder"
|
|
197
|
-
)), ...defaultButtonStyles }));
|
|
198
|
-
addButton.label = ( localizeWithPath(
|
|
199
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
200
|
-
'addButton',
|
|
201
|
-
"Add Folder"
|
|
202
|
-
));
|
|
166
|
+
const buttonBar = this._register(( (new ButtonBar(addButtonBarElement))));
|
|
167
|
+
const addButton = this._register(buttonBar.addButton({ title: ( localizeWithPath(_moduleId, 11, "Add Folder")), ...defaultButtonStyles }));
|
|
168
|
+
addButton.label = ( localizeWithPath(_moduleId, 11, "Add Folder"));
|
|
203
169
|
this._register(addButton.onDidClick(async () => {
|
|
204
170
|
const uri = await this.fileDialogService.showOpenDialog({
|
|
205
171
|
canSelectFiles: false,
|
|
206
172
|
canSelectFolders: true,
|
|
207
173
|
canSelectMany: false,
|
|
208
174
|
defaultUri: this.currentWorkspaceUri,
|
|
209
|
-
openLabel: ( localizeWithPath(
|
|
210
|
-
|
|
211
|
-
'trustUri',
|
|
212
|
-
"Trust Folder"
|
|
213
|
-
)),
|
|
214
|
-
title: ( localizeWithPath(
|
|
215
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
216
|
-
'selectTrustedUri',
|
|
217
|
-
"Select Folder To Trust"
|
|
218
|
-
))
|
|
175
|
+
openLabel: ( localizeWithPath(_moduleId, 12, "Trust Folder")),
|
|
176
|
+
title: ( localizeWithPath(_moduleId, 13, "Select Folder To Trust"))
|
|
219
177
|
});
|
|
220
178
|
if (uri) {
|
|
221
179
|
this.workspaceTrustManagementService.setUrisTrust(uri, true);
|
|
@@ -251,11 +209,11 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
251
209
|
}
|
|
252
210
|
get trustedUriEntries() {
|
|
253
211
|
const currentWorkspace = this.workspaceService.getWorkspace();
|
|
254
|
-
const currentWorkspaceUris = ( currentWorkspace.folders.map(folder => folder.uri));
|
|
212
|
+
const currentWorkspaceUris = ( (currentWorkspace.folders.map(folder => folder.uri)));
|
|
255
213
|
if (currentWorkspace.configuration) {
|
|
256
214
|
currentWorkspaceUris.push(currentWorkspace.configuration);
|
|
257
215
|
}
|
|
258
|
-
const entries = ( this.workspaceTrustManagementService.getTrustedUris().map(uri => {
|
|
216
|
+
const entries = ( (this.workspaceTrustManagementService.getTrustedUris().map(uri => {
|
|
259
217
|
let relatedToCurrentWorkspace = false;
|
|
260
218
|
for (const workspaceUri of currentWorkspaceUris) {
|
|
261
219
|
relatedToCurrentWorkspace = relatedToCurrentWorkspace || this.uriService.extUri.isEqualOrParent(workspaceUri, uri);
|
|
@@ -264,7 +222,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
264
222
|
uri,
|
|
265
223
|
parentOfWorkspaceItem: relatedToCurrentWorkspace
|
|
266
224
|
};
|
|
267
|
-
}));
|
|
225
|
+
})));
|
|
268
226
|
const sortedEntries = entries.sort((a, b) => {
|
|
269
227
|
if (a.uri.scheme !== b.uri.scheme) {
|
|
270
228
|
if (a.uri.scheme === Schemas.file) {
|
|
@@ -296,15 +254,11 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
296
254
|
this.container.classList.toggle('empty', entries.length === 0);
|
|
297
255
|
this.descriptionElement.innerText = entries.length ?
|
|
298
256
|
( localizeWithPath(
|
|
299
|
-
|
|
300
|
-
|
|
257
|
+
_moduleId,
|
|
258
|
+
14,
|
|
301
259
|
"You trust the following folders, their subfolders, and workspace files."
|
|
302
260
|
)) :
|
|
303
|
-
( localizeWithPath(
|
|
304
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
305
|
-
'noTrustedFoldersDescriptions',
|
|
306
|
-
"You haven't trusted any folders or workspace files yet."
|
|
307
|
-
));
|
|
261
|
+
( localizeWithPath(_moduleId, 15, "You haven't trusted any folders or workspace files yet."));
|
|
308
262
|
this.table.splice(0, Number.POSITIVE_INFINITY, this.trustedUriEntries);
|
|
309
263
|
this.layout();
|
|
310
264
|
}
|
|
@@ -318,8 +272,8 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
318
272
|
return {
|
|
319
273
|
type: 2 ,
|
|
320
274
|
content: ( localizeWithPath(
|
|
321
|
-
|
|
322
|
-
|
|
275
|
+
_moduleId,
|
|
276
|
+
16,
|
|
323
277
|
"You will trust all repositories on {0}.",
|
|
324
278
|
getHostLabel(this.labelService, item)
|
|
325
279
|
))
|
|
@@ -329,8 +283,8 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
329
283
|
return {
|
|
330
284
|
type: 2 ,
|
|
331
285
|
content: ( localizeWithPath(
|
|
332
|
-
|
|
333
|
-
|
|
286
|
+
_moduleId,
|
|
287
|
+
17,
|
|
334
288
|
"You will trust all repositories and forks under '{0}' on {1}.",
|
|
335
289
|
segments[0],
|
|
336
290
|
getHostLabel(this.labelService, item)
|
|
@@ -341,8 +295,8 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
341
295
|
return {
|
|
342
296
|
type: 3 ,
|
|
343
297
|
content: ( localizeWithPath(
|
|
344
|
-
|
|
345
|
-
|
|
298
|
+
_moduleId,
|
|
299
|
+
18,
|
|
346
300
|
"You cannot trust individual folders within a repository.",
|
|
347
301
|
path
|
|
348
302
|
))
|
|
@@ -386,16 +340,8 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
386
340
|
canSelectFolders: true,
|
|
387
341
|
canSelectMany: false,
|
|
388
342
|
defaultUri: item.uri,
|
|
389
|
-
openLabel: ( localizeWithPath(
|
|
390
|
-
|
|
391
|
-
'trustUri',
|
|
392
|
-
"Trust Folder"
|
|
393
|
-
)),
|
|
394
|
-
title: ( localizeWithPath(
|
|
395
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
396
|
-
'selectTrustedUri',
|
|
397
|
-
"Select Folder To Trust"
|
|
398
|
-
))
|
|
343
|
+
openLabel: ( localizeWithPath(_moduleId, 12, "Trust Folder")),
|
|
344
|
+
title: ( localizeWithPath(_moduleId, 13, "Select Folder To Trust"))
|
|
399
345
|
});
|
|
400
346
|
if (uri) {
|
|
401
347
|
this.acceptEdit(item, uri[0]);
|
|
@@ -410,14 +356,14 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
410
356
|
}
|
|
411
357
|
}
|
|
412
358
|
};
|
|
413
|
-
WorkspaceTrustedUrisTable = ( __decorate([
|
|
414
|
-
( __param(1, IInstantiationService)),
|
|
415
|
-
( __param(2, IWorkspaceContextService)),
|
|
416
|
-
( __param(3, IWorkspaceTrustManagementService)),
|
|
417
|
-
( __param(4, IUriIdentityService)),
|
|
418
|
-
( __param(5, ILabelService)),
|
|
419
|
-
( __param(6, IFileDialogService))
|
|
420
|
-
], WorkspaceTrustedUrisTable));
|
|
359
|
+
WorkspaceTrustedUrisTable = ( (__decorate([
|
|
360
|
+
( (__param(1, IInstantiationService))),
|
|
361
|
+
( (__param(2, IWorkspaceContextService))),
|
|
362
|
+
( (__param(3, IWorkspaceTrustManagementService))),
|
|
363
|
+
( (__param(4, IUriIdentityService))),
|
|
364
|
+
( (__param(5, ILabelService))),
|
|
365
|
+
( (__param(6, IFileDialogService)))
|
|
366
|
+
], WorkspaceTrustedUrisTable)));
|
|
421
367
|
class TrustedUriTableVirtualDelegate {
|
|
422
368
|
constructor() {
|
|
423
369
|
this.headerRowHeight = TrustedUriTableVirtualDelegate.HEADER_ROW_HEIGHT;
|
|
@@ -439,7 +385,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
439
385
|
}
|
|
440
386
|
renderTemplate(container) {
|
|
441
387
|
const element = container.appendChild($('.actions'));
|
|
442
|
-
const actionBar = ( new ActionBar(element));
|
|
388
|
+
const actionBar = ( (new ActionBar(element)));
|
|
443
389
|
return { actionBar };
|
|
444
390
|
}
|
|
445
391
|
renderElement(item, index, templateData, height) {
|
|
@@ -461,11 +407,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
461
407
|
class: ThemeIcon.asClassName(editIcon),
|
|
462
408
|
enabled: true,
|
|
463
409
|
id: 'editTrustedUri',
|
|
464
|
-
tooltip: ( localizeWithPath(
|
|
465
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
466
|
-
'editTrustedUri',
|
|
467
|
-
"Edit Path"
|
|
468
|
-
)),
|
|
410
|
+
tooltip: ( localizeWithPath(_moduleId, 19, "Edit Path")),
|
|
469
411
|
run: () => {
|
|
470
412
|
this.table.edit(item, false);
|
|
471
413
|
}
|
|
@@ -476,11 +418,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
476
418
|
class: ThemeIcon.asClassName(folderPickerIcon),
|
|
477
419
|
enabled: true,
|
|
478
420
|
id: 'pickerTrustedUri',
|
|
479
|
-
tooltip: ( localizeWithPath(
|
|
480
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
481
|
-
'pickerTrustedUri',
|
|
482
|
-
"Open File Picker"
|
|
483
|
-
)),
|
|
421
|
+
tooltip: ( localizeWithPath(_moduleId, 20, "Open File Picker")),
|
|
484
422
|
run: () => {
|
|
485
423
|
this.table.edit(item, true);
|
|
486
424
|
}
|
|
@@ -491,11 +429,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
491
429
|
class: ThemeIcon.asClassName(removeIcon),
|
|
492
430
|
enabled: true,
|
|
493
431
|
id: 'deleteTrustedUri',
|
|
494
|
-
tooltip: ( localizeWithPath(
|
|
495
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
496
|
-
'deleteTrustedUri',
|
|
497
|
-
"Delete Path"
|
|
498
|
-
)),
|
|
432
|
+
tooltip: ( localizeWithPath(_moduleId, 21, "Delete Path")),
|
|
499
433
|
run: async () => {
|
|
500
434
|
await this.table.delete(item);
|
|
501
435
|
}
|
|
@@ -505,9 +439,9 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
505
439
|
templateData.actionBar.dispose();
|
|
506
440
|
}
|
|
507
441
|
};
|
|
508
|
-
TrustedUriActionsColumnRenderer = TrustedUriActionsColumnRenderer_1 = ( __decorate([
|
|
509
|
-
( __param(2, IUriIdentityService))
|
|
510
|
-
], TrustedUriActionsColumnRenderer));
|
|
442
|
+
TrustedUriActionsColumnRenderer = TrustedUriActionsColumnRenderer_1 = ( (__decorate([
|
|
443
|
+
( (__param(2, IUriIdentityService)))
|
|
444
|
+
], TrustedUriActionsColumnRenderer)));
|
|
511
445
|
let TrustedUriPathColumnRenderer = class TrustedUriPathColumnRenderer {
|
|
512
446
|
static { TrustedUriPathColumnRenderer_1 = this; }
|
|
513
447
|
static { this.TEMPLATE_ID = 'path'; }
|
|
@@ -519,14 +453,14 @@ let TrustedUriPathColumnRenderer = class TrustedUriPathColumnRenderer {
|
|
|
519
453
|
renderTemplate(container) {
|
|
520
454
|
const element = container.appendChild($('.path'));
|
|
521
455
|
const pathLabel = element.appendChild($('div.path-label'));
|
|
522
|
-
const pathInput = ( new InputBox(element, this.contextViewService, {
|
|
456
|
+
const pathInput = ( (new InputBox(element, this.contextViewService, {
|
|
523
457
|
validationOptions: {
|
|
524
458
|
validation: value => this.table.validateUri(value, this.currentItem)
|
|
525
459
|
},
|
|
526
460
|
inputBoxStyles: defaultInputBoxStyles
|
|
527
|
-
}));
|
|
528
|
-
const disposables = ( new DisposableStore());
|
|
529
|
-
const renderDisposables = disposables.add(( new DisposableStore()));
|
|
461
|
+
})));
|
|
462
|
+
const disposables = ( (new DisposableStore()));
|
|
463
|
+
const renderDisposables = disposables.add(( (new DisposableStore())));
|
|
530
464
|
return {
|
|
531
465
|
element,
|
|
532
466
|
pathLabel,
|
|
@@ -608,15 +542,11 @@ let TrustedUriPathColumnRenderer = class TrustedUriPathColumnRenderer {
|
|
|
608
542
|
return uri.path;
|
|
609
543
|
}
|
|
610
544
|
};
|
|
611
|
-
TrustedUriPathColumnRenderer = TrustedUriPathColumnRenderer_1 = ( __decorate([
|
|
612
|
-
( __param(1, IContextViewService))
|
|
613
|
-
], TrustedUriPathColumnRenderer));
|
|
545
|
+
TrustedUriPathColumnRenderer = TrustedUriPathColumnRenderer_1 = ( (__decorate([
|
|
546
|
+
( (__param(1, IContextViewService)))
|
|
547
|
+
], TrustedUriPathColumnRenderer)));
|
|
614
548
|
function getHostLabel(labelService, item) {
|
|
615
|
-
return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localizeWithPath(
|
|
616
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
617
|
-
'localAuthority',
|
|
618
|
-
"Local"
|
|
619
|
-
));
|
|
549
|
+
return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localizeWithPath(_moduleId, 22, "Local"));
|
|
620
550
|
}
|
|
621
551
|
let TrustedUriHostColumnRenderer = class TrustedUriHostColumnRenderer {
|
|
622
552
|
static { TrustedUriHostColumnRenderer_1 = this; }
|
|
@@ -626,8 +556,8 @@ let TrustedUriHostColumnRenderer = class TrustedUriHostColumnRenderer {
|
|
|
626
556
|
this.templateId = TrustedUriHostColumnRenderer_1.TEMPLATE_ID;
|
|
627
557
|
}
|
|
628
558
|
renderTemplate(container) {
|
|
629
|
-
const disposables = ( new DisposableStore());
|
|
630
|
-
const renderDisposables = disposables.add(( new DisposableStore()));
|
|
559
|
+
const disposables = ( (new DisposableStore()));
|
|
560
|
+
const renderDisposables = disposables.add(( (new DisposableStore())));
|
|
631
561
|
const element = container.appendChild($('.host'));
|
|
632
562
|
const hostContainer = element.appendChild($('div.host-label'));
|
|
633
563
|
const buttonBarContainer = element.appendChild($('div.button-bar'));
|
|
@@ -651,9 +581,9 @@ let TrustedUriHostColumnRenderer = class TrustedUriHostColumnRenderer {
|
|
|
651
581
|
templateData.disposables.dispose();
|
|
652
582
|
}
|
|
653
583
|
};
|
|
654
|
-
TrustedUriHostColumnRenderer = TrustedUriHostColumnRenderer_1 = ( __decorate([
|
|
655
|
-
( __param(0, ILabelService))
|
|
656
|
-
], TrustedUriHostColumnRenderer));
|
|
584
|
+
TrustedUriHostColumnRenderer = TrustedUriHostColumnRenderer_1 = ( (__decorate([
|
|
585
|
+
( (__param(0, ILabelService)))
|
|
586
|
+
], TrustedUriHostColumnRenderer)));
|
|
657
587
|
let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
658
588
|
static { WorkspaceTrustEditor_1 = this; }
|
|
659
589
|
static { this.ID = 'workbench.editor.workspaceTrust'; }
|
|
@@ -669,17 +599,17 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
669
599
|
this.productService = productService;
|
|
670
600
|
this.keybindingService = keybindingService;
|
|
671
601
|
this.rendering = false;
|
|
672
|
-
this.rerenderDisposables = this._register(( new DisposableStore()));
|
|
602
|
+
this.rerenderDisposables = this._register(( (new DisposableStore())));
|
|
673
603
|
this.layoutParticipants = [];
|
|
674
604
|
}
|
|
675
605
|
createEditor(parent) {
|
|
676
606
|
this.rootElement = append(parent, $('.workspace-trust-editor', { tabindex: '0' }));
|
|
677
607
|
this.createHeaderElement(this.rootElement);
|
|
678
608
|
const scrollableContent = $('.workspace-trust-editor-body');
|
|
679
|
-
this.bodyScrollBar = this._register(( new DomScrollableElement(scrollableContent, {
|
|
609
|
+
this.bodyScrollBar = this._register(( (new DomScrollableElement(scrollableContent, {
|
|
680
610
|
horizontal: 2 ,
|
|
681
611
|
vertical: 1 ,
|
|
682
|
-
})));
|
|
612
|
+
}))));
|
|
683
613
|
append(this.rootElement, this.bodyScrollBar.getDomNode());
|
|
684
614
|
this.createAffectedFeaturesElement(scrollableContent);
|
|
685
615
|
this.createConfigurationElement(scrollableContent);
|
|
@@ -688,7 +618,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
688
618
|
this.rootElement.style.setProperty('--workspace-trust-check-color', asCssVariable(debugIconStartForeground));
|
|
689
619
|
this.rootElement.style.setProperty('--workspace-trust-x-color', asCssVariable(editorErrorForeground));
|
|
690
620
|
this._register(addDisposableListener(this.rootElement, EventType.KEY_DOWN, e => {
|
|
691
|
-
const event = ( new StandardKeyboardEvent(e));
|
|
621
|
+
const event = ( (new StandardKeyboardEvent(e)));
|
|
692
622
|
if (event.equals(16 ) || event.equals(18 )) {
|
|
693
623
|
const navOrder = [this.headerContainer, this.trustedContainer, this.untrustedContainer, this.configurationContainer];
|
|
694
624
|
const currentIndex = navOrder.findIndex(element => {
|
|
@@ -749,38 +679,18 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
749
679
|
getHeaderTitleText(trusted) {
|
|
750
680
|
if (trusted) {
|
|
751
681
|
if (this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
|
|
752
|
-
return ( localizeWithPath(
|
|
753
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
754
|
-
'trustedUnsettableWindow',
|
|
755
|
-
"This window is trusted"
|
|
756
|
-
));
|
|
682
|
+
return ( localizeWithPath(_moduleId, 23, "This window is trusted"));
|
|
757
683
|
}
|
|
758
684
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
759
685
|
case 1 :
|
|
760
|
-
return ( localizeWithPath(
|
|
761
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
762
|
-
'trustedHeaderWindow',
|
|
763
|
-
"You trust this window"
|
|
764
|
-
));
|
|
686
|
+
return ( localizeWithPath(_moduleId, 24, "You trust this window"));
|
|
765
687
|
case 2 :
|
|
766
|
-
return ( localizeWithPath(
|
|
767
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
768
|
-
'trustedHeaderFolder',
|
|
769
|
-
"You trust this folder"
|
|
770
|
-
));
|
|
688
|
+
return ( localizeWithPath(_moduleId, 25, "You trust this folder"));
|
|
771
689
|
case 3 :
|
|
772
|
-
return ( localizeWithPath(
|
|
773
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
774
|
-
'trustedHeaderWorkspace',
|
|
775
|
-
"You trust this workspace"
|
|
776
|
-
));
|
|
690
|
+
return ( localizeWithPath(_moduleId, 26, "You trust this workspace"));
|
|
777
691
|
}
|
|
778
692
|
}
|
|
779
|
-
return ( localizeWithPath(
|
|
780
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
781
|
-
'untrustedHeader',
|
|
782
|
-
"You are in Restricted Mode"
|
|
783
|
-
));
|
|
693
|
+
return ( localizeWithPath(_moduleId, 27, "You are in Restricted Mode"));
|
|
784
694
|
}
|
|
785
695
|
getHeaderTitleIconClassNames(trusted) {
|
|
786
696
|
return ThemeIcon.asClassNameArray(shieldIcon);
|
|
@@ -790,67 +700,43 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
790
700
|
let subTitle = '';
|
|
791
701
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
792
702
|
case 1 : {
|
|
793
|
-
title = trusted ? ( localizeWithPath(
|
|
794
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
795
|
-
'trustedWindow',
|
|
796
|
-
"In a Trusted Window"
|
|
797
|
-
)) : ( localizeWithPath(
|
|
798
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
799
|
-
'untrustedWorkspace',
|
|
800
|
-
"In Restricted Mode"
|
|
801
|
-
));
|
|
703
|
+
title = trusted ? ( localizeWithPath(_moduleId, 28, "In a Trusted Window")) : ( localizeWithPath(_moduleId, 29, "In Restricted Mode"));
|
|
802
704
|
subTitle = trusted ? ( localizeWithPath(
|
|
803
|
-
|
|
804
|
-
|
|
705
|
+
_moduleId,
|
|
706
|
+
30,
|
|
805
707
|
"You trust the authors of the files in the current window. All features are enabled:"
|
|
806
708
|
)) :
|
|
807
709
|
( localizeWithPath(
|
|
808
|
-
|
|
809
|
-
|
|
710
|
+
_moduleId,
|
|
711
|
+
31,
|
|
810
712
|
"You do not trust the authors of the files in the current window. The following features are disabled:"
|
|
811
713
|
));
|
|
812
714
|
break;
|
|
813
715
|
}
|
|
814
716
|
case 2 : {
|
|
815
|
-
title = trusted ? ( localizeWithPath(
|
|
816
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
817
|
-
'trustedFolder',
|
|
818
|
-
"In a Trusted Folder"
|
|
819
|
-
)) : ( localizeWithPath(
|
|
820
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
821
|
-
'untrustedWorkspace',
|
|
822
|
-
"In Restricted Mode"
|
|
823
|
-
));
|
|
717
|
+
title = trusted ? ( localizeWithPath(_moduleId, 32, "In a Trusted Folder")) : ( localizeWithPath(_moduleId, 29, "In Restricted Mode"));
|
|
824
718
|
subTitle = trusted ? ( localizeWithPath(
|
|
825
|
-
|
|
826
|
-
|
|
719
|
+
_moduleId,
|
|
720
|
+
33,
|
|
827
721
|
"You trust the authors of the files in the current folder. All features are enabled:"
|
|
828
722
|
)) :
|
|
829
723
|
( localizeWithPath(
|
|
830
|
-
|
|
831
|
-
|
|
724
|
+
_moduleId,
|
|
725
|
+
34,
|
|
832
726
|
"You do not trust the authors of the files in the current folder. The following features are disabled:"
|
|
833
727
|
));
|
|
834
728
|
break;
|
|
835
729
|
}
|
|
836
730
|
case 3 : {
|
|
837
|
-
title = trusted ? ( localizeWithPath(
|
|
838
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
839
|
-
'trustedWorkspace',
|
|
840
|
-
"In a Trusted Workspace"
|
|
841
|
-
)) : ( localizeWithPath(
|
|
842
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
843
|
-
'untrustedWorkspace',
|
|
844
|
-
"In Restricted Mode"
|
|
845
|
-
));
|
|
731
|
+
title = trusted ? ( localizeWithPath(_moduleId, 35, "In a Trusted Workspace")) : ( localizeWithPath(_moduleId, 29, "In Restricted Mode"));
|
|
846
732
|
subTitle = trusted ? ( localizeWithPath(
|
|
847
|
-
|
|
848
|
-
|
|
733
|
+
_moduleId,
|
|
734
|
+
36,
|
|
849
735
|
"You trust the authors of the files in the current workspace. All features are enabled:"
|
|
850
736
|
)) :
|
|
851
737
|
( localizeWithPath(
|
|
852
|
-
|
|
853
|
-
|
|
738
|
+
_moduleId,
|
|
739
|
+
37,
|
|
854
740
|
"You do not trust the authors of the files in the current workspace. The following features are disabled:"
|
|
855
741
|
));
|
|
856
742
|
break;
|
|
@@ -874,20 +760,20 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
874
760
|
const headerDescriptionText = append(this.headerDescription, $('div'));
|
|
875
761
|
headerDescriptionText.innerText = isWorkspaceTrusted ?
|
|
876
762
|
( localizeWithPath(
|
|
877
|
-
|
|
878
|
-
|
|
763
|
+
_moduleId,
|
|
764
|
+
38,
|
|
879
765
|
"All features are enabled because trust has been granted to the workspace."
|
|
880
766
|
)) :
|
|
881
767
|
( localizeWithPath(
|
|
882
|
-
|
|
883
|
-
|
|
768
|
+
_moduleId,
|
|
769
|
+
39,
|
|
884
770
|
"{0} is in a restricted mode intended for safe code browsing.",
|
|
885
771
|
this.productService.nameShort
|
|
886
772
|
));
|
|
887
773
|
const headerDescriptionActions = append(this.headerDescription, $('div'));
|
|
888
774
|
const headerDescriptionActionsText = ( localizeWithPath(
|
|
889
|
-
|
|
890
|
-
|
|
775
|
+
_moduleId,
|
|
776
|
+
40,
|
|
891
777
|
"[Configure your settings]({0}) or [learn more](https://aka.ms/vscode-workspace-trust).",
|
|
892
778
|
`command:workbench.trust.configure`
|
|
893
779
|
));
|
|
@@ -900,13 +786,9 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
900
786
|
}
|
|
901
787
|
}
|
|
902
788
|
this.headerContainer.className = this.getHeaderContainerClass(isWorkspaceTrusted);
|
|
903
|
-
this.rootElement.setAttribute('aria-label', `${( localizeWithPath(
|
|
904
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
905
|
-
'root element label',
|
|
906
|
-
"Manage Workspace Trust"
|
|
907
|
-
))}: ${this.headerContainer.innerText}`);
|
|
789
|
+
this.rootElement.setAttribute('aria-label', `${( localizeWithPath(_moduleId, 41, "Manage Workspace Trust"))}: ${this.headerContainer.innerText}`);
|
|
908
790
|
const restrictedSettings = this.configurationService.restrictedSettings;
|
|
909
|
-
const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
791
|
+
const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
|
|
910
792
|
const settingsRequiringTrustedWorkspaceCount = restrictedSettings.default.filter(key => {
|
|
911
793
|
const property = configurationRegistry.getConfigurationProperties()[key];
|
|
912
794
|
if (property.scope === 1 || property.scope === 2 ) {
|
|
@@ -917,7 +799,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
917
799
|
return true;
|
|
918
800
|
}
|
|
919
801
|
if (restrictedSettings.workspaceFolder) {
|
|
920
|
-
for (const workspaceFolderSettings of ( restrictedSettings.workspaceFolder.values())) {
|
|
802
|
+
for (const workspaceFolderSettings of ( (restrictedSettings.workspaceFolder.values()))) {
|
|
921
803
|
if (workspaceFolderSettings.includes(key)) {
|
|
922
804
|
return true;
|
|
923
805
|
}
|
|
@@ -934,9 +816,9 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
934
816
|
this.rendering = false;
|
|
935
817
|
}
|
|
936
818
|
getExtensionCount() {
|
|
937
|
-
const set = ( new Set());
|
|
819
|
+
const set = ( (new Set()));
|
|
938
820
|
const inVirtualWorkspace = isVirtualWorkspace(this.workspaceService.getWorkspace());
|
|
939
|
-
const localExtensions = ( this.extensionWorkbenchService.local.filter(ext => ext.local).map(ext => ext.local));
|
|
821
|
+
const localExtensions = ( (this.extensionWorkbenchService.local.filter(ext => ext.local).map(ext => ext.local)));
|
|
940
822
|
for (const extension of localExtensions) {
|
|
941
823
|
const enablementState = this.extensionEnablementService.getEnablementState(extension);
|
|
942
824
|
if (enablementState !== 8 && enablementState !== 9 &&
|
|
@@ -951,9 +833,9 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
951
833
|
continue;
|
|
952
834
|
}
|
|
953
835
|
const dependencies = getExtensionDependencies(localExtensions, extension);
|
|
954
|
-
if (( dependencies.some(
|
|
836
|
+
if (( (dependencies.some(
|
|
955
837
|
ext => this.extensionManifestPropertiesService.getExtensionUntrustedWorkspaceSupportType(ext.manifest) === false
|
|
956
|
-
))) {
|
|
838
|
+
)))) {
|
|
957
839
|
set.add(extension.identifier.id);
|
|
958
840
|
}
|
|
959
841
|
}
|
|
@@ -969,11 +851,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
969
851
|
createConfigurationElement(parent) {
|
|
970
852
|
this.configurationContainer = append(parent, $('.workspace-trust-settings', { tabIndex: '0' }));
|
|
971
853
|
const configurationTitle = append(this.configurationContainer, $('.workspace-trusted-folders-title'));
|
|
972
|
-
configurationTitle.innerText = ( localizeWithPath(
|
|
973
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
974
|
-
'trustedFoldersAndWorkspaces',
|
|
975
|
-
"Trusted Folders & Workspaces"
|
|
976
|
-
));
|
|
854
|
+
configurationTitle.innerText = ( localizeWithPath(_moduleId, 10, "Trusted Folders & Workspaces"));
|
|
977
855
|
this.workspaceTrustedUrisTable = this._register(this.instantiationService.createInstance(WorkspaceTrustedUrisTable, this.configurationContainer));
|
|
978
856
|
}
|
|
979
857
|
createAffectedFeaturesElement(parent) {
|
|
@@ -988,92 +866,44 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
988
866
|
this.renderLimitationsHeaderElement(this.trustedContainer, trustedTitle, trustedSubTitle);
|
|
989
867
|
const trustedContainerItems = this.workspaceService.getWorkbenchState() === 1 ?
|
|
990
868
|
[
|
|
991
|
-
( localizeWithPath(
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
"Tasks are allowed to run"
|
|
995
|
-
)),
|
|
996
|
-
( localizeWithPath(
|
|
997
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
998
|
-
'trustedDebugging',
|
|
999
|
-
"Debugging is enabled"
|
|
1000
|
-
)),
|
|
1001
|
-
( localizeWithPath(
|
|
1002
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1003
|
-
'trustedExtensions',
|
|
1004
|
-
"All enabled extensions are activated"
|
|
1005
|
-
))
|
|
869
|
+
( localizeWithPath(_moduleId, 42, "Tasks are allowed to run")),
|
|
870
|
+
( localizeWithPath(_moduleId, 43, "Debugging is enabled")),
|
|
871
|
+
( localizeWithPath(_moduleId, 44, "All enabled extensions are activated"))
|
|
1006
872
|
] :
|
|
1007
873
|
[
|
|
1008
|
-
( localizeWithPath(
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
)),
|
|
1013
|
-
( localizeWithPath(
|
|
1014
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1015
|
-
'trustedDebugging',
|
|
1016
|
-
"Debugging is enabled"
|
|
1017
|
-
)),
|
|
1018
|
-
( localizeWithPath(
|
|
1019
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1020
|
-
'trustedSettings',
|
|
1021
|
-
"All workspace settings are applied"
|
|
1022
|
-
)),
|
|
1023
|
-
( localizeWithPath(
|
|
1024
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1025
|
-
'trustedExtensions',
|
|
1026
|
-
"All enabled extensions are activated"
|
|
1027
|
-
))
|
|
874
|
+
( localizeWithPath(_moduleId, 42, "Tasks are allowed to run")),
|
|
875
|
+
( localizeWithPath(_moduleId, 43, "Debugging is enabled")),
|
|
876
|
+
( localizeWithPath(_moduleId, 45, "All workspace settings are applied")),
|
|
877
|
+
( localizeWithPath(_moduleId, 44, "All enabled extensions are activated"))
|
|
1028
878
|
];
|
|
1029
879
|
this.renderLimitationsListElement(this.trustedContainer, trustedContainerItems, ThemeIcon.asClassNameArray(checkListIcon));
|
|
1030
880
|
const [untrustedTitle, untrustedSubTitle] = this.getFeaturesHeaderText(false);
|
|
1031
881
|
this.renderLimitationsHeaderElement(this.untrustedContainer, untrustedTitle, untrustedSubTitle);
|
|
1032
882
|
const untrustedContainerItems = this.workspaceService.getWorkbenchState() === 1 ?
|
|
1033
883
|
[
|
|
1034
|
-
( localizeWithPath(
|
|
1035
|
-
|
|
1036
|
-
'untrustedTasks',
|
|
1037
|
-
"Tasks are not allowed to run"
|
|
1038
|
-
)),
|
|
1039
|
-
( localizeWithPath(
|
|
1040
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1041
|
-
'untrustedDebugging',
|
|
1042
|
-
"Debugging is disabled"
|
|
1043
|
-
)),
|
|
884
|
+
( localizeWithPath(_moduleId, 46, "Tasks are not allowed to run")),
|
|
885
|
+
( localizeWithPath(_moduleId, 47, "Debugging is disabled")),
|
|
1044
886
|
fixBadLocalizedLinks(( localizeWithPath(
|
|
1045
|
-
|
|
1046
|
-
|
|
887
|
+
_moduleId,
|
|
888
|
+
48,
|
|
1047
889
|
"[{0} extensions]({1}) are disabled or have limited functionality",
|
|
1048
890
|
numExtensions,
|
|
1049
891
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
|
|
1050
892
|
)))
|
|
1051
893
|
] :
|
|
1052
894
|
[
|
|
1053
|
-
( localizeWithPath(
|
|
1054
|
-
|
|
1055
|
-
'untrustedTasks',
|
|
1056
|
-
"Tasks are not allowed to run"
|
|
1057
|
-
)),
|
|
1058
|
-
( localizeWithPath(
|
|
1059
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1060
|
-
'untrustedDebugging',
|
|
1061
|
-
"Debugging is disabled"
|
|
1062
|
-
)),
|
|
895
|
+
( localizeWithPath(_moduleId, 46, "Tasks are not allowed to run")),
|
|
896
|
+
( localizeWithPath(_moduleId, 47, "Debugging is disabled")),
|
|
1063
897
|
fixBadLocalizedLinks(numSettings ? ( localizeWithPath(
|
|
1064
|
-
|
|
1065
|
-
|
|
898
|
+
_moduleId,
|
|
899
|
+
49,
|
|
1066
900
|
"[{0} workspace settings]({1}) are not applied",
|
|
1067
901
|
numSettings,
|
|
1068
902
|
'command:settings.filterUntrusted'
|
|
1069
|
-
)) : ( localizeWithPath(
|
|
1070
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1071
|
-
'no untrustedSettings',
|
|
1072
|
-
"Workspace settings requiring trust are not applied"
|
|
1073
|
-
))),
|
|
903
|
+
)) : ( localizeWithPath(_moduleId, 50, "Workspace settings requiring trust are not applied"))),
|
|
1074
904
|
fixBadLocalizedLinks(( localizeWithPath(
|
|
1075
|
-
|
|
1076
|
-
|
|
905
|
+
_moduleId,
|
|
906
|
+
48,
|
|
1077
907
|
"[{0} extensions]({1}) are disabled or have limited functionality",
|
|
1078
908
|
numExtensions,
|
|
1079
909
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
|
|
@@ -1097,18 +927,13 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
1097
927
|
createButtonRow(parent, buttonInfo, enabled) {
|
|
1098
928
|
const buttonRow = append(parent, $('.workspace-trust-buttons-row'));
|
|
1099
929
|
const buttonContainer = append(buttonRow, $('.workspace-trust-buttons'));
|
|
1100
|
-
const buttonBar = this.rerenderDisposables.add(( new ButtonBar(buttonContainer)));
|
|
930
|
+
const buttonBar = this.rerenderDisposables.add(( (new ButtonBar(buttonContainer))));
|
|
1101
931
|
for (const { action, keybinding } of buttonInfo) {
|
|
1102
932
|
const button = buttonBar.addButtonWithDescription(defaultButtonStyles);
|
|
1103
933
|
button.label = action.label;
|
|
1104
934
|
button.enabled = enabled !== undefined ? enabled : action.enabled;
|
|
1105
935
|
button.description = keybinding.getLabel();
|
|
1106
|
-
button.element.ariaLabel = action.label + ', ' + ( localizeWithPath(
|
|
1107
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1108
|
-
'keyboardShortcut',
|
|
1109
|
-
"Keyboard Shortcut: {0}",
|
|
1110
|
-
keybinding.getAriaLabel()
|
|
1111
|
-
));
|
|
936
|
+
button.element.ariaLabel = action.label + ', ' + ( localizeWithPath(_moduleId, 51, "Keyboard Shortcut: {0}", keybinding.getAriaLabel()));
|
|
1112
937
|
this.rerenderDisposables.add(button.onDidClick(e => {
|
|
1113
938
|
if (e) {
|
|
1114
939
|
EventHelper.stop(e, true);
|
|
@@ -1118,44 +943,32 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
1118
943
|
}
|
|
1119
944
|
}
|
|
1120
945
|
addTrustButtonToElement(parent) {
|
|
1121
|
-
const trustAction = ( new Action('workspace.trust.button.action.grant', ( localizeWithPath(
|
|
1122
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1123
|
-
'trustButton',
|
|
1124
|
-
"Trust"
|
|
1125
|
-
)), undefined, true, async () => {
|
|
946
|
+
const trustAction = ( (new Action('workspace.trust.button.action.grant', ( localizeWithPath(_moduleId, 52, "Trust")), undefined, true, async () => {
|
|
1126
947
|
await this.workspaceTrustManagementService.setWorkspaceTrust(true);
|
|
1127
|
-
}));
|
|
948
|
+
})));
|
|
1128
949
|
const trustActions = [{ action: trustAction, keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter')[0] }];
|
|
1129
950
|
if (this.workspaceTrustManagementService.canSetParentFolderTrust()) {
|
|
1130
951
|
const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceService.getWorkspace());
|
|
1131
952
|
const name = basename(dirname(workspaceIdentifier.uri));
|
|
1132
953
|
const trustMessageElement = append(parent, $('.trust-message-box'));
|
|
1133
954
|
trustMessageElement.innerText = ( localizeWithPath(
|
|
1134
|
-
|
|
1135
|
-
|
|
955
|
+
_moduleId,
|
|
956
|
+
53,
|
|
1136
957
|
"Trust the authors of all files in the current folder or its parent '{0}'.",
|
|
1137
958
|
name
|
|
1138
959
|
));
|
|
1139
|
-
const trustParentAction = ( new Action('workspace.trust.button.action.grantParent', ( localizeWithPath(
|
|
1140
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1141
|
-
'trustParentButton',
|
|
1142
|
-
"Trust Parent"
|
|
1143
|
-
)), undefined, true, async () => {
|
|
960
|
+
const trustParentAction = ( (new Action('workspace.trust.button.action.grantParent', ( localizeWithPath(_moduleId, 54, "Trust Parent")), undefined, true, async () => {
|
|
1144
961
|
await this.workspaceTrustManagementService.setParentFolderTrust(true);
|
|
1145
|
-
}));
|
|
962
|
+
})));
|
|
1146
963
|
trustActions.push({ action: trustParentAction, keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Shift+Enter' : 'Ctrl+Shift+Enter')[0] });
|
|
1147
964
|
}
|
|
1148
965
|
this.createButtonRow(parent, trustActions);
|
|
1149
966
|
}
|
|
1150
967
|
addDontTrustButtonToElement(parent) {
|
|
1151
968
|
this.createButtonRow(parent, [{
|
|
1152
|
-
action: ( new Action('workspace.trust.button.action.deny', ( localizeWithPath(
|
|
1153
|
-
'vs/workbench/contrib/workspace/browser/workspaceTrustEditor',
|
|
1154
|
-
'dontTrustButton',
|
|
1155
|
-
"Don't Trust"
|
|
1156
|
-
)), undefined, true, async () => {
|
|
969
|
+
action: ( (new Action('workspace.trust.button.action.deny', ( localizeWithPath(_moduleId, 55, "Don't Trust")), undefined, true, async () => {
|
|
1157
970
|
await this.workspaceTrustManagementService.setWorkspaceTrust(false);
|
|
1158
|
-
})),
|
|
971
|
+
}))),
|
|
1159
972
|
keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter')[0]
|
|
1160
973
|
}]);
|
|
1161
974
|
}
|
|
@@ -1166,19 +979,19 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
1166
979
|
const textElement = append(parent, $('.workspace-trust-untrusted-description'));
|
|
1167
980
|
if (!this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
|
|
1168
981
|
textElement.innerText = this.workspaceService.getWorkbenchState() === 3 ? ( localizeWithPath(
|
|
1169
|
-
|
|
1170
|
-
|
|
982
|
+
_moduleId,
|
|
983
|
+
56,
|
|
1171
984
|
"This workspace is trusted via the bolded entries in the trusted folders below."
|
|
1172
985
|
)) : ( localizeWithPath(
|
|
1173
|
-
|
|
1174
|
-
|
|
986
|
+
_moduleId,
|
|
987
|
+
57,
|
|
1175
988
|
"This folder is trusted via the bolded entries in the the trusted folders below."
|
|
1176
989
|
));
|
|
1177
990
|
}
|
|
1178
991
|
else {
|
|
1179
992
|
textElement.innerText = ( localizeWithPath(
|
|
1180
|
-
|
|
1181
|
-
|
|
993
|
+
_moduleId,
|
|
994
|
+
58,
|
|
1182
995
|
"This window is trusted by nature of the workspace that is opened."
|
|
1183
996
|
));
|
|
1184
997
|
}
|
|
@@ -1221,23 +1034,23 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
1221
1034
|
this.bodyScrollBar.scanDomNode();
|
|
1222
1035
|
}
|
|
1223
1036
|
};
|
|
1224
|
-
WorkspaceTrustEditor.__decorator = ( __decorate([
|
|
1037
|
+
WorkspaceTrustEditor.__decorator = ( (__decorate([
|
|
1225
1038
|
debounce(100)
|
|
1226
|
-
], WorkspaceTrustEditor.prototype, "render", null));
|
|
1227
|
-
WorkspaceTrustEditor = WorkspaceTrustEditor_1 = ( __decorate([
|
|
1228
|
-
( __param(1, ITelemetryService)),
|
|
1229
|
-
( __param(2, IThemeService)),
|
|
1230
|
-
( __param(3, IStorageService)),
|
|
1231
|
-
( __param(4, IWorkspaceContextService)),
|
|
1232
|
-
( __param(5, IExtensionsWorkbenchService)),
|
|
1233
|
-
( __param(6, IExtensionManifestPropertiesService)),
|
|
1234
|
-
( __param(7, IInstantiationService)),
|
|
1235
|
-
( __param(8, IWorkspaceTrustManagementService)),
|
|
1236
|
-
( __param(9, IWorkbenchConfigurationService)),
|
|
1237
|
-
( __param(10, IWorkbenchExtensionEnablementService)),
|
|
1238
|
-
( __param(11, IProductService)),
|
|
1239
|
-
( __param(12, IKeybindingService))
|
|
1240
|
-
], WorkspaceTrustEditor));
|
|
1039
|
+
], WorkspaceTrustEditor.prototype, "render", null)));
|
|
1040
|
+
WorkspaceTrustEditor = WorkspaceTrustEditor_1 = ( (__decorate([
|
|
1041
|
+
( (__param(1, ITelemetryService))),
|
|
1042
|
+
( (__param(2, IThemeService))),
|
|
1043
|
+
( (__param(3, IStorageService))),
|
|
1044
|
+
( (__param(4, IWorkspaceContextService))),
|
|
1045
|
+
( (__param(5, IExtensionsWorkbenchService))),
|
|
1046
|
+
( (__param(6, IExtensionManifestPropertiesService))),
|
|
1047
|
+
( (__param(7, IInstantiationService))),
|
|
1048
|
+
( (__param(8, IWorkspaceTrustManagementService))),
|
|
1049
|
+
( (__param(9, IWorkbenchConfigurationService))),
|
|
1050
|
+
( (__param(10, IWorkbenchExtensionEnablementService))),
|
|
1051
|
+
( (__param(11, IProductService))),
|
|
1052
|
+
( (__param(12, IKeybindingService)))
|
|
1053
|
+
], WorkspaceTrustEditor)));
|
|
1241
1054
|
function fixBadLocalizedLinks(badString) {
|
|
1242
1055
|
const regex = /(.*)\[(.+)\]\s*\((.+)\)(.*)/;
|
|
1243
1056
|
return badString.replace(regex, '$1[$2]($3)$4');
|