@codingame/monaco-vscode-workspace-trust-service-override 1.83.1 → 1.83.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-workspace-trust-service-override",
|
|
3
|
-
"version": "1.83.
|
|
3
|
+
"version": "1.83.2",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.83.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.83.2",
|
|
22
22
|
"monaco-editor": "0.44.0"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -50,18 +50,18 @@ import { basename, dirname } from 'monaco-editor/esm/vs/base/common/resources.js
|
|
|
50
50
|
import { IFileDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
|
|
51
51
|
|
|
52
52
|
var TrustedUriActionsColumnRenderer_1, TrustedUriPathColumnRenderer_1, TrustedUriHostColumnRenderer_1, WorkspaceTrustEditor_1;
|
|
53
|
-
const shieldIcon = registerIcon('workspace-trust-banner', Codicon.shield, (
|
|
54
|
-
const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, (
|
|
55
|
-
const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, (
|
|
56
|
-
const folderPickerIcon = registerIcon('workspace-trust-editor-folder-picker', Codicon.folder, (
|
|
53
|
+
const shieldIcon = registerIcon('workspace-trust-banner', Codicon.shield, ( localize('shieldIcon', 'Icon for workspace trust ion the banner.')));
|
|
54
|
+
const checkListIcon = registerIcon('workspace-trust-editor-check', Codicon.check, ( localize('checkListIcon', 'Icon for the checkmark in the workspace trust editor.')));
|
|
55
|
+
const xListIcon = registerIcon('workspace-trust-editor-cross', Codicon.x, ( localize('xListIcon', 'Icon for the cross in the workspace trust editor.')));
|
|
56
|
+
const folderPickerIcon = registerIcon('workspace-trust-editor-folder-picker', Codicon.folder, ( localize(
|
|
57
57
|
'folderPickerIcon',
|
|
58
58
|
'Icon for the pick folder icon in the workspace trust editor.'
|
|
59
|
-
)))
|
|
60
|
-
const editIcon = registerIcon('workspace-trust-editor-edit-folder', Codicon.edit, (
|
|
61
|
-
const removeIcon = registerIcon('workspace-trust-editor-remove-folder', Codicon.close, (
|
|
59
|
+
)));
|
|
60
|
+
const editIcon = registerIcon('workspace-trust-editor-edit-folder', Codicon.edit, ( localize('editIcon', 'Icon for the edit folder icon in the workspace trust editor.')));
|
|
61
|
+
const removeIcon = registerIcon('workspace-trust-editor-remove-folder', Codicon.close, ( localize(
|
|
62
62
|
'removeIcon',
|
|
63
63
|
'Icon for the remove folder icon in the workspace trust editor.'
|
|
64
|
-
)))
|
|
64
|
+
)));
|
|
65
65
|
let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposable {
|
|
66
66
|
constructor(container, instantiationService, workspaceService, workspaceTrustManagementService, uriService, labelService, fileDialogService) {
|
|
67
67
|
super();
|
|
@@ -72,27 +72,27 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
72
72
|
this.uriService = uriService;
|
|
73
73
|
this.labelService = labelService;
|
|
74
74
|
this.fileDialogService = fileDialogService;
|
|
75
|
-
this._onDidAcceptEdit = this._register((
|
|
75
|
+
this._onDidAcceptEdit = this._register(( new Emitter()));
|
|
76
76
|
this.onDidAcceptEdit = this._onDidAcceptEdit.event;
|
|
77
|
-
this._onDidRejectEdit = this._register((
|
|
77
|
+
this._onDidRejectEdit = this._register(( new Emitter()));
|
|
78
78
|
this.onDidRejectEdit = this._onDidRejectEdit.event;
|
|
79
|
-
this._onEdit = this._register((
|
|
79
|
+
this._onEdit = this._register(( new Emitter()));
|
|
80
80
|
this.onEdit = this._onEdit.event;
|
|
81
|
-
this._onDelete = this._register((
|
|
81
|
+
this._onDelete = this._register(( new Emitter()));
|
|
82
82
|
this.onDelete = this._onDelete.event;
|
|
83
83
|
this.descriptionElement = container.appendChild($('.workspace-trusted-folders-description'));
|
|
84
84
|
const tableElement = container.appendChild($('.trusted-uris-table'));
|
|
85
85
|
const addButtonBarElement = container.appendChild($('.trusted-uris-button-bar'));
|
|
86
|
-
this.table = this.instantiationService.createInstance(WorkbenchTable, 'WorkspaceTrust', tableElement, (
|
|
86
|
+
this.table = this.instantiationService.createInstance(WorkbenchTable, 'WorkspaceTrust', tableElement, ( new TrustedUriTableVirtualDelegate()), [
|
|
87
87
|
{
|
|
88
|
-
label: (
|
|
88
|
+
label: ( localize('hostColumnLabel', "Host")),
|
|
89
89
|
tooltip: '',
|
|
90
90
|
weight: 1,
|
|
91
91
|
templateId: TrustedUriHostColumnRenderer.TEMPLATE_ID,
|
|
92
92
|
project(row) { return row; }
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
|
-
label: (
|
|
95
|
+
label: ( localize('pathColumnLabel', "Path")),
|
|
96
96
|
tooltip: '',
|
|
97
97
|
weight: 8,
|
|
98
98
|
templateId: TrustedUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -120,24 +120,20 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
120
120
|
getAriaLabel: (item) => {
|
|
121
121
|
const hostLabel = getHostLabel(this.labelService, item);
|
|
122
122
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
123
|
-
return (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
))
|
|
129
|
-
);
|
|
123
|
+
return ( localize(
|
|
124
|
+
'trustedFolderAriaLabel',
|
|
125
|
+
"{0}, trusted",
|
|
126
|
+
this.labelService.getUriLabel(item.uri)
|
|
127
|
+
));
|
|
130
128
|
}
|
|
131
|
-
return (
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
))
|
|
138
|
-
);
|
|
129
|
+
return ( localize(
|
|
130
|
+
'trustedFolderWithHostAriaLabel',
|
|
131
|
+
"{0} on {1}, trusted",
|
|
132
|
+
this.labelService.getUriLabel(item.uri),
|
|
133
|
+
hostLabel
|
|
134
|
+
));
|
|
139
135
|
},
|
|
140
|
-
getWidgetAriaLabel: () => (
|
|
136
|
+
getWidgetAriaLabel: () => ( localize('trustedFoldersAndWorkspaces', "Trusted Folders & Workspaces"))
|
|
141
137
|
}
|
|
142
138
|
});
|
|
143
139
|
this._register(this.table.onDidOpen(item => {
|
|
@@ -145,17 +141,17 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
145
141
|
this.edit(item.element, true);
|
|
146
142
|
}
|
|
147
143
|
}));
|
|
148
|
-
const buttonBar = this._register((
|
|
149
|
-
const addButton = this._register(buttonBar.addButton({ title: (
|
|
150
|
-
addButton.label = (
|
|
144
|
+
const buttonBar = this._register(( new ButtonBar(addButtonBarElement)));
|
|
145
|
+
const addButton = this._register(buttonBar.addButton({ title: ( localize('addButton', "Add Folder")), ...defaultButtonStyles }));
|
|
146
|
+
addButton.label = ( localize('addButton', "Add Folder"));
|
|
151
147
|
this._register(addButton.onDidClick(async () => {
|
|
152
148
|
const uri = await this.fileDialogService.showOpenDialog({
|
|
153
149
|
canSelectFiles: false,
|
|
154
150
|
canSelectFolders: true,
|
|
155
151
|
canSelectMany: false,
|
|
156
152
|
defaultUri: this.currentWorkspaceUri,
|
|
157
|
-
openLabel: (
|
|
158
|
-
title: (
|
|
153
|
+
openLabel: ( localize('trustUri', "Trust Folder")),
|
|
154
|
+
title: ( localize('selectTrustedUri', "Select Folder To Trust"))
|
|
159
155
|
});
|
|
160
156
|
if (uri) {
|
|
161
157
|
this.workspaceTrustManagementService.setUrisTrust(uri, true);
|
|
@@ -191,11 +187,11 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
191
187
|
}
|
|
192
188
|
get trustedUriEntries() {
|
|
193
189
|
const currentWorkspace = this.workspaceService.getWorkspace();
|
|
194
|
-
const currentWorkspaceUris = (
|
|
190
|
+
const currentWorkspaceUris = ( currentWorkspace.folders.map(folder => folder.uri));
|
|
195
191
|
if (currentWorkspace.configuration) {
|
|
196
192
|
currentWorkspaceUris.push(currentWorkspace.configuration);
|
|
197
193
|
}
|
|
198
|
-
const entries = (
|
|
194
|
+
const entries = ( this.workspaceTrustManagementService.getTrustedUris().map(uri => {
|
|
199
195
|
let relatedToCurrentWorkspace = false;
|
|
200
196
|
for (const workspaceUri of currentWorkspaceUris) {
|
|
201
197
|
relatedToCurrentWorkspace = relatedToCurrentWorkspace || this.uriService.extUri.isEqualOrParent(workspaceUri, uri);
|
|
@@ -204,7 +200,7 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
204
200
|
uri,
|
|
205
201
|
parentOfWorkspaceItem: relatedToCurrentWorkspace
|
|
206
202
|
};
|
|
207
|
-
}))
|
|
203
|
+
}));
|
|
208
204
|
const sortedEntries = entries.sort((a, b) => {
|
|
209
205
|
if (a.uri.scheme !== b.uri.scheme) {
|
|
210
206
|
if (a.uri.scheme === Schemas.file) {
|
|
@@ -235,14 +231,14 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
235
231
|
const entries = this.trustedUriEntries;
|
|
236
232
|
this.container.classList.toggle('empty', entries.length === 0);
|
|
237
233
|
this.descriptionElement.innerText = entries.length ?
|
|
238
|
-
(
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
234
|
+
( localize(
|
|
235
|
+
'trustedFoldersDescription',
|
|
236
|
+
"You trust the following folders, their subfolders, and workspace files."
|
|
237
|
+
)) :
|
|
238
|
+
( localize(
|
|
239
|
+
'noTrustedFoldersDescriptions',
|
|
240
|
+
"You haven't trusted any folders or workspace files yet."
|
|
241
|
+
));
|
|
246
242
|
this.table.splice(0, Number.POSITIVE_INFINITY, this.trustedUriEntries);
|
|
247
243
|
this.layout();
|
|
248
244
|
}
|
|
@@ -255,32 +251,32 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
255
251
|
if (segments.length === 0 && path.startsWith(posix.sep)) {
|
|
256
252
|
return {
|
|
257
253
|
type: 2 ,
|
|
258
|
-
content: (
|
|
254
|
+
content: ( localize(
|
|
259
255
|
{ key: 'trustAll', comment: ['The {0} will be a host name where repositories are hosted.'] },
|
|
260
256
|
"You will trust all repositories on {0}.",
|
|
261
257
|
getHostLabel(this.labelService, item)
|
|
262
|
-
))
|
|
258
|
+
))
|
|
263
259
|
};
|
|
264
260
|
}
|
|
265
261
|
if (segments.length === 1) {
|
|
266
262
|
return {
|
|
267
263
|
type: 2 ,
|
|
268
|
-
content: (
|
|
264
|
+
content: ( localize(
|
|
269
265
|
{ key: 'trustOrg', comment: ['The {0} will be an organization or user name.', 'The {1} will be a host name where repositories are hosted.'] },
|
|
270
266
|
"You will trust all repositories and forks under '{0}' on {1}.",
|
|
271
267
|
segments[0],
|
|
272
268
|
getHostLabel(this.labelService, item)
|
|
273
|
-
))
|
|
269
|
+
))
|
|
274
270
|
};
|
|
275
271
|
}
|
|
276
272
|
if (segments.length > 2) {
|
|
277
273
|
return {
|
|
278
274
|
type: 3 ,
|
|
279
|
-
content: (
|
|
275
|
+
content: ( localize(
|
|
280
276
|
'invalidTrust',
|
|
281
277
|
"You cannot trust individual folders within a repository.",
|
|
282
278
|
path
|
|
283
|
-
))
|
|
279
|
+
))
|
|
284
280
|
};
|
|
285
281
|
}
|
|
286
282
|
}
|
|
@@ -316,8 +312,8 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
316
312
|
canSelectFolders: true,
|
|
317
313
|
canSelectMany: false,
|
|
318
314
|
defaultUri: item.uri,
|
|
319
|
-
openLabel: (
|
|
320
|
-
title: (
|
|
315
|
+
openLabel: ( localize('trustUri', "Trust Folder")),
|
|
316
|
+
title: ( localize('selectTrustedUri', "Select Folder To Trust"))
|
|
321
317
|
});
|
|
322
318
|
if (uri) {
|
|
323
319
|
this.acceptEdit(item, uri[0]);
|
|
@@ -332,14 +328,14 @@ let WorkspaceTrustedUrisTable = class WorkspaceTrustedUrisTable extends Disposab
|
|
|
332
328
|
}
|
|
333
329
|
}
|
|
334
330
|
};
|
|
335
|
-
WorkspaceTrustedUrisTable = (
|
|
336
|
-
(
|
|
337
|
-
(
|
|
338
|
-
(
|
|
339
|
-
(
|
|
340
|
-
(
|
|
341
|
-
(
|
|
342
|
-
], WorkspaceTrustedUrisTable))
|
|
331
|
+
WorkspaceTrustedUrisTable = ( __decorate([
|
|
332
|
+
( __param(1, IInstantiationService)),
|
|
333
|
+
( __param(2, IWorkspaceContextService)),
|
|
334
|
+
( __param(3, IWorkspaceTrustManagementService)),
|
|
335
|
+
( __param(4, IUriIdentityService)),
|
|
336
|
+
( __param(5, ILabelService)),
|
|
337
|
+
( __param(6, IFileDialogService))
|
|
338
|
+
], WorkspaceTrustedUrisTable));
|
|
343
339
|
class TrustedUriTableVirtualDelegate {
|
|
344
340
|
constructor() {
|
|
345
341
|
this.headerRowHeight = TrustedUriTableVirtualDelegate.HEADER_ROW_HEIGHT;
|
|
@@ -361,7 +357,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
361
357
|
}
|
|
362
358
|
renderTemplate(container) {
|
|
363
359
|
const element = container.appendChild($('.actions'));
|
|
364
|
-
const actionBar = (
|
|
360
|
+
const actionBar = ( new ActionBar(element, { animated: false }));
|
|
365
361
|
return { actionBar };
|
|
366
362
|
}
|
|
367
363
|
renderElement(item, index, templateData, height) {
|
|
@@ -383,7 +379,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
383
379
|
class: ThemeIcon.asClassName(editIcon),
|
|
384
380
|
enabled: true,
|
|
385
381
|
id: 'editTrustedUri',
|
|
386
|
-
tooltip: (
|
|
382
|
+
tooltip: ( localize('editTrustedUri', "Edit Path")),
|
|
387
383
|
run: () => {
|
|
388
384
|
this.table.edit(item, false);
|
|
389
385
|
}
|
|
@@ -394,7 +390,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
394
390
|
class: ThemeIcon.asClassName(folderPickerIcon),
|
|
395
391
|
enabled: true,
|
|
396
392
|
id: 'pickerTrustedUri',
|
|
397
|
-
tooltip: (
|
|
393
|
+
tooltip: ( localize('pickerTrustedUri', "Open File Picker")),
|
|
398
394
|
run: () => {
|
|
399
395
|
this.table.edit(item, true);
|
|
400
396
|
}
|
|
@@ -405,7 +401,7 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
405
401
|
class: ThemeIcon.asClassName(removeIcon),
|
|
406
402
|
enabled: true,
|
|
407
403
|
id: 'deleteTrustedUri',
|
|
408
|
-
tooltip: (
|
|
404
|
+
tooltip: ( localize('deleteTrustedUri', "Delete Path")),
|
|
409
405
|
run: async () => {
|
|
410
406
|
await this.table.delete(item);
|
|
411
407
|
}
|
|
@@ -415,9 +411,9 @@ let TrustedUriActionsColumnRenderer = class TrustedUriActionsColumnRenderer {
|
|
|
415
411
|
templateData.actionBar.dispose();
|
|
416
412
|
}
|
|
417
413
|
};
|
|
418
|
-
TrustedUriActionsColumnRenderer = TrustedUriActionsColumnRenderer_1 = (
|
|
419
|
-
(
|
|
420
|
-
], TrustedUriActionsColumnRenderer))
|
|
414
|
+
TrustedUriActionsColumnRenderer = TrustedUriActionsColumnRenderer_1 = ( __decorate([
|
|
415
|
+
( __param(2, IUriIdentityService))
|
|
416
|
+
], TrustedUriActionsColumnRenderer));
|
|
421
417
|
let TrustedUriPathColumnRenderer = class TrustedUriPathColumnRenderer {
|
|
422
418
|
static { TrustedUriPathColumnRenderer_1 = this; }
|
|
423
419
|
static { this.TEMPLATE_ID = 'path'; }
|
|
@@ -429,14 +425,14 @@ let TrustedUriPathColumnRenderer = class TrustedUriPathColumnRenderer {
|
|
|
429
425
|
renderTemplate(container) {
|
|
430
426
|
const element = container.appendChild($('.path'));
|
|
431
427
|
const pathLabel = element.appendChild($('div.path-label'));
|
|
432
|
-
const pathInput = (
|
|
428
|
+
const pathInput = ( new InputBox(element, this.contextViewService, {
|
|
433
429
|
validationOptions: {
|
|
434
430
|
validation: value => this.table.validateUri(value, this.currentItem)
|
|
435
431
|
},
|
|
436
432
|
inputBoxStyles: defaultInputBoxStyles
|
|
437
|
-
}))
|
|
438
|
-
const disposables = (
|
|
439
|
-
const renderDisposables = disposables.add((
|
|
433
|
+
}));
|
|
434
|
+
const disposables = ( new DisposableStore());
|
|
435
|
+
const renderDisposables = disposables.add(( new DisposableStore()));
|
|
440
436
|
return {
|
|
441
437
|
element,
|
|
442
438
|
pathLabel,
|
|
@@ -518,11 +514,11 @@ let TrustedUriPathColumnRenderer = class TrustedUriPathColumnRenderer {
|
|
|
518
514
|
return uri.path;
|
|
519
515
|
}
|
|
520
516
|
};
|
|
521
|
-
TrustedUriPathColumnRenderer = TrustedUriPathColumnRenderer_1 = (
|
|
522
|
-
(
|
|
523
|
-
], TrustedUriPathColumnRenderer))
|
|
517
|
+
TrustedUriPathColumnRenderer = TrustedUriPathColumnRenderer_1 = ( __decorate([
|
|
518
|
+
( __param(1, IContextViewService))
|
|
519
|
+
], TrustedUriPathColumnRenderer));
|
|
524
520
|
function getHostLabel(labelService, item) {
|
|
525
|
-
return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : (
|
|
521
|
+
return item.uri.authority ? labelService.getHostLabel(item.uri.scheme, item.uri.authority) : ( localize('localAuthority', "Local"));
|
|
526
522
|
}
|
|
527
523
|
let TrustedUriHostColumnRenderer = class TrustedUriHostColumnRenderer {
|
|
528
524
|
static { TrustedUriHostColumnRenderer_1 = this; }
|
|
@@ -532,8 +528,8 @@ let TrustedUriHostColumnRenderer = class TrustedUriHostColumnRenderer {
|
|
|
532
528
|
this.templateId = TrustedUriHostColumnRenderer_1.TEMPLATE_ID;
|
|
533
529
|
}
|
|
534
530
|
renderTemplate(container) {
|
|
535
|
-
const disposables = (
|
|
536
|
-
const renderDisposables = disposables.add((
|
|
531
|
+
const disposables = ( new DisposableStore());
|
|
532
|
+
const renderDisposables = disposables.add(( new DisposableStore()));
|
|
537
533
|
const element = container.appendChild($('.host'));
|
|
538
534
|
const hostContainer = element.appendChild($('div.host-label'));
|
|
539
535
|
const buttonBarContainer = element.appendChild($('div.button-bar'));
|
|
@@ -557,9 +553,9 @@ let TrustedUriHostColumnRenderer = class TrustedUriHostColumnRenderer {
|
|
|
557
553
|
templateData.disposables.dispose();
|
|
558
554
|
}
|
|
559
555
|
};
|
|
560
|
-
TrustedUriHostColumnRenderer = TrustedUriHostColumnRenderer_1 = (
|
|
561
|
-
(
|
|
562
|
-
], TrustedUriHostColumnRenderer))
|
|
556
|
+
TrustedUriHostColumnRenderer = TrustedUriHostColumnRenderer_1 = ( __decorate([
|
|
557
|
+
( __param(0, ILabelService))
|
|
558
|
+
], TrustedUriHostColumnRenderer));
|
|
563
559
|
let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
564
560
|
static { WorkspaceTrustEditor_1 = this; }
|
|
565
561
|
static { this.ID = 'workbench.editor.workspaceTrust'; }
|
|
@@ -575,17 +571,17 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
575
571
|
this.productService = productService;
|
|
576
572
|
this.keybindingService = keybindingService;
|
|
577
573
|
this.rendering = false;
|
|
578
|
-
this.rerenderDisposables = this._register((
|
|
574
|
+
this.rerenderDisposables = this._register(( new DisposableStore()));
|
|
579
575
|
this.layoutParticipants = [];
|
|
580
576
|
}
|
|
581
577
|
createEditor(parent) {
|
|
582
578
|
this.rootElement = append(parent, $('.workspace-trust-editor', { tabindex: '0' }));
|
|
583
579
|
this.createHeaderElement(this.rootElement);
|
|
584
580
|
const scrollableContent = $('.workspace-trust-editor-body');
|
|
585
|
-
this.bodyScrollBar = this._register((
|
|
581
|
+
this.bodyScrollBar = this._register(( new DomScrollableElement(scrollableContent, {
|
|
586
582
|
horizontal: 2 ,
|
|
587
583
|
vertical: 1 ,
|
|
588
|
-
})))
|
|
584
|
+
})));
|
|
589
585
|
append(this.rootElement, this.bodyScrollBar.getDomNode());
|
|
590
586
|
this.createAffectedFeaturesElement(scrollableContent);
|
|
591
587
|
this.createConfigurationElement(scrollableContent);
|
|
@@ -594,7 +590,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
594
590
|
this.rootElement.style.setProperty('--workspace-trust-check-color', asCssVariable(debugIconStartForeground));
|
|
595
591
|
this.rootElement.style.setProperty('--workspace-trust-x-color', asCssVariable(editorErrorForeground));
|
|
596
592
|
this._register(addDisposableListener(this.rootElement, EventType.KEY_DOWN, e => {
|
|
597
|
-
const event = (
|
|
593
|
+
const event = ( new StandardKeyboardEvent(e));
|
|
598
594
|
if (event.equals(16 ) || event.equals(18 )) {
|
|
599
595
|
const navOrder = [this.headerContainer, this.trustedContainer, this.untrustedContainer, this.configurationContainer];
|
|
600
596
|
const currentIndex = navOrder.findIndex(element => {
|
|
@@ -654,28 +650,18 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
654
650
|
getHeaderTitleText(trusted) {
|
|
655
651
|
if (trusted) {
|
|
656
652
|
if (this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
|
|
657
|
-
return (
|
|
658
|
-
(localize('trustedUnsettableWindow', "This window is trusted"))
|
|
659
|
-
);
|
|
653
|
+
return ( localize('trustedUnsettableWindow', "This window is trusted"));
|
|
660
654
|
}
|
|
661
655
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
662
656
|
case 1 :
|
|
663
|
-
return (
|
|
664
|
-
(localize('trustedHeaderWindow', "You trust this window"))
|
|
665
|
-
);
|
|
657
|
+
return ( localize('trustedHeaderWindow', "You trust this window"));
|
|
666
658
|
case 2 :
|
|
667
|
-
return (
|
|
668
|
-
(localize('trustedHeaderFolder', "You trust this folder"))
|
|
669
|
-
);
|
|
659
|
+
return ( localize('trustedHeaderFolder', "You trust this folder"));
|
|
670
660
|
case 3 :
|
|
671
|
-
return (
|
|
672
|
-
(localize('trustedHeaderWorkspace', "You trust this workspace"))
|
|
673
|
-
);
|
|
661
|
+
return ( localize('trustedHeaderWorkspace', "You trust this workspace"));
|
|
674
662
|
}
|
|
675
663
|
}
|
|
676
|
-
return (
|
|
677
|
-
(localize('untrustedHeader', "You are in Restricted Mode"))
|
|
678
|
-
);
|
|
664
|
+
return ( localize('untrustedHeader', "You are in Restricted Mode"));
|
|
679
665
|
}
|
|
680
666
|
getHeaderTitleIconClassNames(trusted) {
|
|
681
667
|
return ThemeIcon.asClassNameArray(shieldIcon);
|
|
@@ -685,39 +671,39 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
685
671
|
let subTitle = '';
|
|
686
672
|
switch (this.workspaceService.getWorkbenchState()) {
|
|
687
673
|
case 1 : {
|
|
688
|
-
title = trusted ? (
|
|
689
|
-
subTitle = trusted ? (
|
|
674
|
+
title = trusted ? ( localize('trustedWindow', "In a Trusted Window")) : ( localize('untrustedWorkspace', "In Restricted Mode"));
|
|
675
|
+
subTitle = trusted ? ( localize(
|
|
690
676
|
'trustedWindowSubtitle',
|
|
691
677
|
"You trust the authors of the files in the current window. All features are enabled:"
|
|
692
|
-
))
|
|
693
|
-
(
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
678
|
+
)) :
|
|
679
|
+
( localize(
|
|
680
|
+
'untrustedWindowSubtitle',
|
|
681
|
+
"You do not trust the authors of the files in the current window. The following features are disabled:"
|
|
682
|
+
));
|
|
697
683
|
break;
|
|
698
684
|
}
|
|
699
685
|
case 2 : {
|
|
700
|
-
title = trusted ? (
|
|
701
|
-
subTitle = trusted ? (
|
|
686
|
+
title = trusted ? ( localize('trustedFolder', "In a Trusted Folder")) : ( localize('untrustedWorkspace', "In Restricted Mode"));
|
|
687
|
+
subTitle = trusted ? ( localize(
|
|
702
688
|
'trustedFolderSubtitle',
|
|
703
689
|
"You trust the authors of the files in the current folder. All features are enabled:"
|
|
704
|
-
))
|
|
705
|
-
(
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
690
|
+
)) :
|
|
691
|
+
( localize(
|
|
692
|
+
'untrustedFolderSubtitle',
|
|
693
|
+
"You do not trust the authors of the files in the current folder. The following features are disabled:"
|
|
694
|
+
));
|
|
709
695
|
break;
|
|
710
696
|
}
|
|
711
697
|
case 3 : {
|
|
712
|
-
title = trusted ? (
|
|
713
|
-
subTitle = trusted ? (
|
|
698
|
+
title = trusted ? ( localize('trustedWorkspace', "In a Trusted Workspace")) : ( localize('untrustedWorkspace', "In Restricted Mode"));
|
|
699
|
+
subTitle = trusted ? ( localize(
|
|
714
700
|
'trustedWorkspaceSubtitle',
|
|
715
701
|
"You trust the authors of the files in the current workspace. All features are enabled:"
|
|
716
|
-
))
|
|
717
|
-
(
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
702
|
+
)) :
|
|
703
|
+
( localize(
|
|
704
|
+
'untrustedWorkspaceSubtitle',
|
|
705
|
+
"You do not trust the authors of the files in the current workspace. The following features are disabled:"
|
|
706
|
+
));
|
|
721
707
|
break;
|
|
722
708
|
}
|
|
723
709
|
}
|
|
@@ -738,21 +724,21 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
738
724
|
this.headerDescription.innerText = '';
|
|
739
725
|
const headerDescriptionText = append(this.headerDescription, $('div'));
|
|
740
726
|
headerDescriptionText.innerText = isWorkspaceTrusted ?
|
|
741
|
-
(
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
(
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
727
|
+
( localize(
|
|
728
|
+
'trustedDescription',
|
|
729
|
+
"All features are enabled because trust has been granted to the workspace."
|
|
730
|
+
)) :
|
|
731
|
+
( localize(
|
|
732
|
+
'untrustedDescription',
|
|
733
|
+
"{0} is in a restricted mode intended for safe code browsing.",
|
|
734
|
+
this.productService.nameShort
|
|
735
|
+
));
|
|
750
736
|
const headerDescriptionActions = append(this.headerDescription, $('div'));
|
|
751
|
-
const headerDescriptionActionsText = (
|
|
737
|
+
const headerDescriptionActionsText = ( localize(
|
|
752
738
|
{ key: 'workspaceTrustEditorHeaderActions', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] },
|
|
753
739
|
"[Configure your settings]({0}) or [learn more](https://aka.ms/vscode-workspace-trust).",
|
|
754
740
|
`command:workbench.trust.configure`
|
|
755
|
-
))
|
|
741
|
+
));
|
|
756
742
|
for (const node of parseLinkedText(headerDescriptionActionsText).nodes) {
|
|
757
743
|
if (typeof node === 'string') {
|
|
758
744
|
append(headerDescriptionActions, document.createTextNode(node));
|
|
@@ -762,9 +748,9 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
762
748
|
}
|
|
763
749
|
}
|
|
764
750
|
this.headerContainer.className = this.getHeaderContainerClass(isWorkspaceTrusted);
|
|
765
|
-
this.rootElement.setAttribute('aria-label', `${(
|
|
751
|
+
this.rootElement.setAttribute('aria-label', `${( localize('root element label', "Manage Workspace Trust"))}: ${this.headerContainer.innerText}`);
|
|
766
752
|
const restrictedSettings = this.configurationService.restrictedSettings;
|
|
767
|
-
const configurationRegistry = (
|
|
753
|
+
const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
768
754
|
const settingsRequiringTrustedWorkspaceCount = restrictedSettings.default.filter(key => {
|
|
769
755
|
const property = configurationRegistry.getConfigurationProperties()[key];
|
|
770
756
|
if (property.scope === 1 || property.scope === 2 ) {
|
|
@@ -775,7 +761,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
775
761
|
return true;
|
|
776
762
|
}
|
|
777
763
|
if (restrictedSettings.workspaceFolder) {
|
|
778
|
-
for (const workspaceFolderSettings of (
|
|
764
|
+
for (const workspaceFolderSettings of ( restrictedSettings.workspaceFolder.values())) {
|
|
779
765
|
if (workspaceFolderSettings.includes(key)) {
|
|
780
766
|
return true;
|
|
781
767
|
}
|
|
@@ -792,9 +778,9 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
792
778
|
this.rendering = false;
|
|
793
779
|
}
|
|
794
780
|
getExtensionCount() {
|
|
795
|
-
const set = (
|
|
781
|
+
const set = ( new Set());
|
|
796
782
|
const inVirtualWorkspace = isVirtualWorkspace(this.workspaceService.getWorkspace());
|
|
797
|
-
const localExtensions = (
|
|
783
|
+
const localExtensions = ( this.extensionWorkbenchService.local.filter(ext => ext.local).map(ext => ext.local));
|
|
798
784
|
for (const extension of localExtensions) {
|
|
799
785
|
const enablementState = this.extensionEnablementService.getEnablementState(extension);
|
|
800
786
|
if (enablementState !== 8 && enablementState !== 9 &&
|
|
@@ -809,9 +795,9 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
809
795
|
continue;
|
|
810
796
|
}
|
|
811
797
|
const dependencies = getExtensionDependencies(localExtensions, extension);
|
|
812
|
-
if ((
|
|
798
|
+
if (( dependencies.some(
|
|
813
799
|
ext => this.extensionManifestPropertiesService.getExtensionUntrustedWorkspaceSupportType(ext.manifest) === false
|
|
814
|
-
)))
|
|
800
|
+
))) {
|
|
815
801
|
set.add(extension.identifier.id);
|
|
816
802
|
}
|
|
817
803
|
}
|
|
@@ -827,7 +813,7 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
827
813
|
createConfigurationElement(parent) {
|
|
828
814
|
this.configurationContainer = append(parent, $('.workspace-trust-settings', { tabIndex: '0' }));
|
|
829
815
|
const configurationTitle = append(this.configurationContainer, $('.workspace-trusted-folders-title'));
|
|
830
|
-
configurationTitle.innerText = (
|
|
816
|
+
configurationTitle.innerText = ( localize('trustedFoldersAndWorkspaces', "Trusted Folders & Workspaces"));
|
|
831
817
|
this.workspaceTrustedUrisTable = this._register(this.instantiationService.createInstance(WorkspaceTrustedUrisTable, this.configurationContainer));
|
|
832
818
|
}
|
|
833
819
|
createAffectedFeaturesElement(parent) {
|
|
@@ -842,48 +828,48 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
842
828
|
this.renderLimitationsHeaderElement(this.trustedContainer, trustedTitle, trustedSubTitle);
|
|
843
829
|
const trustedContainerItems = this.workspaceService.getWorkbenchState() === 1 ?
|
|
844
830
|
[
|
|
845
|
-
(
|
|
846
|
-
(
|
|
847
|
-
(
|
|
831
|
+
( localize('trustedTasks', "Tasks are allowed to run")),
|
|
832
|
+
( localize('trustedDebugging', "Debugging is enabled")),
|
|
833
|
+
( localize('trustedExtensions', "All enabled extensions are activated"))
|
|
848
834
|
] :
|
|
849
835
|
[
|
|
850
|
-
(
|
|
851
|
-
(
|
|
852
|
-
(
|
|
853
|
-
(
|
|
836
|
+
( localize('trustedTasks', "Tasks are allowed to run")),
|
|
837
|
+
( localize('trustedDebugging', "Debugging is enabled")),
|
|
838
|
+
( localize('trustedSettings', "All workspace settings are applied")),
|
|
839
|
+
( localize('trustedExtensions', "All enabled extensions are activated"))
|
|
854
840
|
];
|
|
855
841
|
this.renderLimitationsListElement(this.trustedContainer, trustedContainerItems, ThemeIcon.asClassNameArray(checkListIcon));
|
|
856
842
|
const [untrustedTitle, untrustedSubTitle] = this.getFeaturesHeaderText(false);
|
|
857
843
|
this.renderLimitationsHeaderElement(this.untrustedContainer, untrustedTitle, untrustedSubTitle);
|
|
858
844
|
const untrustedContainerItems = this.workspaceService.getWorkbenchState() === 1 ?
|
|
859
845
|
[
|
|
860
|
-
(
|
|
861
|
-
(
|
|
862
|
-
fixBadLocalizedLinks((
|
|
846
|
+
( localize('untrustedTasks', "Tasks are not allowed to run")),
|
|
847
|
+
( localize('untrustedDebugging', "Debugging is disabled")),
|
|
848
|
+
fixBadLocalizedLinks(( localize(
|
|
863
849
|
{ key: 'untrustedExtensions', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] },
|
|
864
850
|
"[{0} extensions]({1}) are disabled or have limited functionality",
|
|
865
851
|
numExtensions,
|
|
866
852
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
|
|
867
|
-
)))
|
|
853
|
+
)))
|
|
868
854
|
] :
|
|
869
855
|
[
|
|
870
|
-
(
|
|
871
|
-
(
|
|
872
|
-
fixBadLocalizedLinks(numSettings ? (
|
|
856
|
+
( localize('untrustedTasks', "Tasks are not allowed to run")),
|
|
857
|
+
( localize('untrustedDebugging', "Debugging is disabled")),
|
|
858
|
+
fixBadLocalizedLinks(numSettings ? ( localize(
|
|
873
859
|
{ key: 'untrustedSettings', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] },
|
|
874
860
|
"[{0} workspace settings]({1}) are not applied",
|
|
875
861
|
numSettings,
|
|
876
862
|
'command:settings.filterUntrusted'
|
|
877
|
-
))
|
|
863
|
+
)) : ( localize(
|
|
878
864
|
'no untrustedSettings',
|
|
879
865
|
"Workspace settings requiring trust are not applied"
|
|
880
|
-
)))
|
|
881
|
-
fixBadLocalizedLinks((
|
|
866
|
+
))),
|
|
867
|
+
fixBadLocalizedLinks(( localize(
|
|
882
868
|
{ key: 'untrustedExtensions', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] },
|
|
883
869
|
"[{0} extensions]({1}) are disabled or have limited functionality",
|
|
884
870
|
numExtensions,
|
|
885
871
|
`command:${LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`
|
|
886
|
-
)))
|
|
872
|
+
)))
|
|
887
873
|
];
|
|
888
874
|
this.renderLimitationsListElement(this.untrustedContainer, untrustedContainerItems, ThemeIcon.asClassNameArray(xListIcon));
|
|
889
875
|
if (this.workspaceTrustManagementService.isWorkspaceTrusted()) {
|
|
@@ -903,13 +889,13 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
903
889
|
createButtonRow(parent, buttonInfo, enabled) {
|
|
904
890
|
const buttonRow = append(parent, $('.workspace-trust-buttons-row'));
|
|
905
891
|
const buttonContainer = append(buttonRow, $('.workspace-trust-buttons'));
|
|
906
|
-
const buttonBar = this.rerenderDisposables.add((
|
|
892
|
+
const buttonBar = this.rerenderDisposables.add(( new ButtonBar(buttonContainer)));
|
|
907
893
|
for (const { action, keybinding } of buttonInfo) {
|
|
908
894
|
const button = buttonBar.addButtonWithDescription(defaultButtonStyles);
|
|
909
895
|
button.label = action.label;
|
|
910
896
|
button.enabled = enabled !== undefined ? enabled : action.enabled;
|
|
911
897
|
button.description = keybinding.getLabel();
|
|
912
|
-
button.element.ariaLabel = action.label + ', ' + (
|
|
898
|
+
button.element.ariaLabel = action.label + ', ' + ( localize('keyboardShortcut', "Keyboard Shortcut: {0}", keybinding.getAriaLabel()));
|
|
913
899
|
this.rerenderDisposables.add(button.onDidClick(e => {
|
|
914
900
|
if (e) {
|
|
915
901
|
EventHelper.stop(e, true);
|
|
@@ -919,49 +905,31 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
919
905
|
}
|
|
920
906
|
}
|
|
921
907
|
addTrustButtonToElement(parent) {
|
|
922
|
-
const trustAction = (
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
undefined,
|
|
926
|
-
true,
|
|
927
|
-
async () => {
|
|
928
|
-
await this.workspaceTrustManagementService.setWorkspaceTrust(true);
|
|
929
|
-
}
|
|
930
|
-
)));
|
|
908
|
+
const trustAction = ( new Action('workspace.trust.button.action.grant', ( localize('trustButton', "Trust")), undefined, true, async () => {
|
|
909
|
+
await this.workspaceTrustManagementService.setWorkspaceTrust(true);
|
|
910
|
+
}));
|
|
931
911
|
const trustActions = [{ action: trustAction, keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter')[0] }];
|
|
932
912
|
if (this.workspaceTrustManagementService.canSetParentFolderTrust()) {
|
|
933
913
|
const workspaceIdentifier = toWorkspaceIdentifier(this.workspaceService.getWorkspace());
|
|
934
914
|
const name = basename(dirname(workspaceIdentifier.uri));
|
|
935
915
|
const trustMessageElement = append(parent, $('.trust-message-box'));
|
|
936
|
-
trustMessageElement.innerText = (
|
|
916
|
+
trustMessageElement.innerText = ( localize(
|
|
937
917
|
'trustMessage',
|
|
938
918
|
"Trust the authors of all files in the current folder or its parent '{0}'.",
|
|
939
919
|
name
|
|
940
|
-
))
|
|
941
|
-
const trustParentAction = (
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
undefined,
|
|
945
|
-
true,
|
|
946
|
-
async () => {
|
|
947
|
-
await this.workspaceTrustManagementService.setParentFolderTrust(true);
|
|
948
|
-
}
|
|
949
|
-
)));
|
|
920
|
+
));
|
|
921
|
+
const trustParentAction = ( new Action('workspace.trust.button.action.grantParent', ( localize('trustParentButton', "Trust Parent")), undefined, true, async () => {
|
|
922
|
+
await this.workspaceTrustManagementService.setParentFolderTrust(true);
|
|
923
|
+
}));
|
|
950
924
|
trustActions.push({ action: trustParentAction, keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Shift+Enter' : 'Ctrl+Shift+Enter')[0] });
|
|
951
925
|
}
|
|
952
926
|
this.createButtonRow(parent, trustActions);
|
|
953
927
|
}
|
|
954
928
|
addDontTrustButtonToElement(parent) {
|
|
955
929
|
this.createButtonRow(parent, [{
|
|
956
|
-
action: (
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
undefined,
|
|
960
|
-
true,
|
|
961
|
-
async () => {
|
|
962
|
-
await this.workspaceTrustManagementService.setWorkspaceTrust(false);
|
|
963
|
-
}
|
|
964
|
-
))),
|
|
930
|
+
action: ( new Action('workspace.trust.button.action.deny', ( localize('dontTrustButton', "Don't Trust")), undefined, true, async () => {
|
|
931
|
+
await this.workspaceTrustManagementService.setWorkspaceTrust(false);
|
|
932
|
+
})),
|
|
965
933
|
keybinding: this.keybindingService.resolveUserBinding(isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter')[0]
|
|
966
934
|
}]);
|
|
967
935
|
}
|
|
@@ -971,19 +939,19 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
971
939
|
}
|
|
972
940
|
const textElement = append(parent, $('.workspace-trust-untrusted-description'));
|
|
973
941
|
if (!this.workspaceTrustManagementService.isWorkspaceTrustForced()) {
|
|
974
|
-
textElement.innerText = this.workspaceService.getWorkbenchState() === 3 ? (
|
|
942
|
+
textElement.innerText = this.workspaceService.getWorkbenchState() === 3 ? ( localize(
|
|
975
943
|
'untrustedWorkspaceReason',
|
|
976
944
|
"This workspace is trusted via the bolded entries in the trusted folders below."
|
|
977
|
-
))
|
|
945
|
+
)) : ( localize(
|
|
978
946
|
'untrustedFolderReason',
|
|
979
947
|
"This folder is trusted via the bolded entries in the the trusted folders below."
|
|
980
|
-
))
|
|
948
|
+
));
|
|
981
949
|
}
|
|
982
950
|
else {
|
|
983
|
-
textElement.innerText = (
|
|
951
|
+
textElement.innerText = ( localize(
|
|
984
952
|
'trustedForcedReason',
|
|
985
953
|
"This window is trusted by nature of the workspace that is opened."
|
|
986
|
-
))
|
|
954
|
+
));
|
|
987
955
|
}
|
|
988
956
|
}
|
|
989
957
|
renderLimitationsHeaderElement(parent, headerText, subtitleText) {
|
|
@@ -1024,23 +992,23 @@ let WorkspaceTrustEditor = class WorkspaceTrustEditor extends EditorPane {
|
|
|
1024
992
|
this.bodyScrollBar.scanDomNode();
|
|
1025
993
|
}
|
|
1026
994
|
};
|
|
1027
|
-
WorkspaceTrustEditor.__decorator = (
|
|
995
|
+
WorkspaceTrustEditor.__decorator = ( __decorate([
|
|
1028
996
|
debounce(100)
|
|
1029
|
-
], WorkspaceTrustEditor.prototype, "render", null))
|
|
1030
|
-
WorkspaceTrustEditor = WorkspaceTrustEditor_1 = (
|
|
1031
|
-
(
|
|
1032
|
-
(
|
|
1033
|
-
(
|
|
1034
|
-
(
|
|
1035
|
-
(
|
|
1036
|
-
(
|
|
1037
|
-
(
|
|
1038
|
-
(
|
|
1039
|
-
(
|
|
1040
|
-
(
|
|
1041
|
-
(
|
|
1042
|
-
(
|
|
1043
|
-
], WorkspaceTrustEditor))
|
|
997
|
+
], WorkspaceTrustEditor.prototype, "render", null));
|
|
998
|
+
WorkspaceTrustEditor = WorkspaceTrustEditor_1 = ( __decorate([
|
|
999
|
+
( __param(0, ITelemetryService)),
|
|
1000
|
+
( __param(1, IThemeService)),
|
|
1001
|
+
( __param(2, IStorageService)),
|
|
1002
|
+
( __param(3, IWorkspaceContextService)),
|
|
1003
|
+
( __param(4, IExtensionsWorkbenchService)),
|
|
1004
|
+
( __param(5, IExtensionManifestPropertiesService)),
|
|
1005
|
+
( __param(6, IInstantiationService)),
|
|
1006
|
+
( __param(7, IWorkspaceTrustManagementService)),
|
|
1007
|
+
( __param(8, IWorkbenchConfigurationService)),
|
|
1008
|
+
( __param(9, IWorkbenchExtensionEnablementService)),
|
|
1009
|
+
( __param(10, IProductService)),
|
|
1010
|
+
( __param(11, IKeybindingService))
|
|
1011
|
+
], WorkspaceTrustEditor));
|
|
1044
1012
|
function fixBadLocalizedLinks(badString) {
|
|
1045
1013
|
const regex = /(.*)\[(.+)\]\s*\((.+)\)(.*)/;
|
|
1046
1014
|
return badString.replace(regex, '$1[$2]($3)$4');
|