@codingame/monaco-vscode-timeline-service-override 15.0.2 → 16.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 +10 -7
- package/vscode/src/vs/workbench/contrib/localHistory/browser/localHistory.js +2 -2
- package/vscode/src/vs/workbench/contrib/localHistory/browser/localHistoryCommands.js +33 -33
- package/vscode/src/vs/workbench/contrib/localHistory/browser/localHistoryTimeline.js +1 -1
- package/vscode/src/vs/workbench/contrib/timeline/browser/media/timelinePane.css +50 -0
- package/vscode/src/vs/workbench/contrib/timeline/browser/timeline.contribution.js +9 -9
- package/vscode/src/vs/workbench/contrib/timeline/browser/timelinePane.js +22 -22
- package/vscode/src/vs/workbench/contrib/timeline/common/timelineService.js +3 -4
- package/vscode/src/vs/workbench/contrib/timeline/browser/media/timelinePane.css.js +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-timeline-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - timeline service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-38f25ab8-ea30-5ba9-8a08-ae3308c297c0-common": "
|
|
19
|
-
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-api": "
|
|
23
|
-
"@codingame/monaco-vscode-b71b5434-ce96-5581-8993-e8da380bd63f-common": "
|
|
18
|
+
"@codingame/monaco-vscode-38f25ab8-ea30-5ba9-8a08-ae3308c297c0-common": "16.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "16.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-68b3311c-eb96-5711-8f72-f5f4b2e31932-common": "16.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-7559b0be-bfa5-5fe6-b731-1973fe9fffa1-common": "16.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-api": "16.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-b71b5434-ce96-5581-8993-e8da380bd63f-common": "16.0.0"
|
|
24
24
|
},
|
|
25
25
|
"main": "index.js",
|
|
26
26
|
"module": "index.js",
|
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
".": {
|
|
30
30
|
"default": "./index.js"
|
|
31
31
|
},
|
|
32
|
+
"./vscode/*.css": {
|
|
33
|
+
"default": "./vscode/src/*.css"
|
|
34
|
+
},
|
|
32
35
|
"./vscode/*": {
|
|
33
36
|
"types": "./vscode/src/*.d.ts",
|
|
34
37
|
"default": "./vscode/src/*.js"
|
|
@@ -19,7 +19,7 @@ function getLocalHistoryDateFormatter() {
|
|
|
19
19
|
}
|
|
20
20
|
const LOCAL_HISTORY_MENU_CONTEXT_VALUE = 'localHistory:item';
|
|
21
21
|
const LOCAL_HISTORY_MENU_CONTEXT_KEY = ( ContextKeyExpr.equals('timelineItem', LOCAL_HISTORY_MENU_CONTEXT_VALUE));
|
|
22
|
-
const LOCAL_HISTORY_ICON_ENTRY = registerIcon('localHistory-icon', Codicon.circleOutline, ( localize(
|
|
23
|
-
const LOCAL_HISTORY_ICON_RESTORE = registerIcon('localHistory-restore', Codicon.check, ( localize(
|
|
22
|
+
const LOCAL_HISTORY_ICON_ENTRY = registerIcon('localHistory-icon', Codicon.circleOutline, ( localize(7368, "Icon for a local history entry in the timeline view.")));
|
|
23
|
+
const LOCAL_HISTORY_ICON_RESTORE = registerIcon('localHistory-restore', Codicon.check, ( localize(7369, "Icon for restoring contents of a local history entry.")));
|
|
24
24
|
|
|
25
25
|
export { LOCAL_HISTORY_ICON_ENTRY, LOCAL_HISTORY_ICON_RESTORE, LOCAL_HISTORY_MENU_CONTEXT_KEY, LOCAL_HISTORY_MENU_CONTEXT_VALUE, getLocalHistoryDateFormatter };
|
|
@@ -31,9 +31,9 @@ import { ResourceSet } from '@codingame/monaco-vscode-api/vscode/vs/base/common/
|
|
|
31
31
|
import { IHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/history/common/history.service';
|
|
32
32
|
import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
33
33
|
|
|
34
|
-
const LOCAL_HISTORY_CATEGORY = ( localize2(
|
|
34
|
+
const LOCAL_HISTORY_CATEGORY = ( localize2(7370, 'Local History'));
|
|
35
35
|
const CTX_LOCAL_HISTORY_ENABLED = ( ContextKeyExpr.has('config.workbench.localHistory.enabled'));
|
|
36
|
-
const COMPARE_WITH_FILE_LABEL = ( localize2(
|
|
36
|
+
const COMPARE_WITH_FILE_LABEL = ( localize2(7371, 'Compare with File'));
|
|
37
37
|
registerAction2(class extends Action2 {
|
|
38
38
|
constructor() {
|
|
39
39
|
super({
|
|
@@ -60,7 +60,7 @@ registerAction2(class extends Action2 {
|
|
|
60
60
|
constructor() {
|
|
61
61
|
super({
|
|
62
62
|
id: 'workbench.action.localHistory.compareWithPrevious',
|
|
63
|
-
title: ( localize2(
|
|
63
|
+
title: ( localize2(7372, 'Compare with Previous')),
|
|
64
64
|
menu: {
|
|
65
65
|
id: MenuId.TimelineItemContext,
|
|
66
66
|
group: '1_compare',
|
|
@@ -88,7 +88,7 @@ registerAction2(class extends Action2 {
|
|
|
88
88
|
constructor() {
|
|
89
89
|
super({
|
|
90
90
|
id: 'workbench.action.localHistory.selectForCompare',
|
|
91
|
-
title: ( localize2(
|
|
91
|
+
title: ( localize2(7373, 'Select for Compare')),
|
|
92
92
|
menu: {
|
|
93
93
|
id: MenuId.TimelineItemContext,
|
|
94
94
|
group: '2_compare_with',
|
|
@@ -111,7 +111,7 @@ registerAction2(class extends Action2 {
|
|
|
111
111
|
constructor() {
|
|
112
112
|
super({
|
|
113
113
|
id: 'workbench.action.localHistory.compareWithSelected',
|
|
114
|
-
title: ( localize2(
|
|
114
|
+
title: ( localize2(7374, 'Compare with Selected')),
|
|
115
115
|
menu: {
|
|
116
116
|
id: MenuId.TimelineItemContext,
|
|
117
117
|
group: '2_compare_with',
|
|
@@ -140,7 +140,7 @@ registerAction2(class extends Action2 {
|
|
|
140
140
|
constructor() {
|
|
141
141
|
super({
|
|
142
142
|
id: 'workbench.action.localHistory.open',
|
|
143
|
-
title: ( localize2(
|
|
143
|
+
title: ( localize2(7375, 'Show Contents')),
|
|
144
144
|
menu: {
|
|
145
145
|
id: MenuId.TimelineItemContext,
|
|
146
146
|
group: '3_contents',
|
|
@@ -158,7 +158,7 @@ registerAction2(class extends Action2 {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
});
|
|
161
|
-
const RESTORE_CONTENTS_LABEL = ( localize2(
|
|
161
|
+
const RESTORE_CONTENTS_LABEL = ( localize2(7376, 'Restore Contents'));
|
|
162
162
|
registerAction2(class extends Action2 {
|
|
163
163
|
constructor() {
|
|
164
164
|
super({
|
|
@@ -195,7 +195,7 @@ registerAction2(class extends Action2 {
|
|
|
195
195
|
return restore(accessor, item);
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
|
-
const restoreSaveSource = SaveSourceRegistry.registerSource('localHistoryRestore.source', ( localize(
|
|
198
|
+
const restoreSaveSource = SaveSourceRegistry.registerSource('localHistoryRestore.source', ( localize(7377, "File Restored")));
|
|
199
199
|
async function restore(accessor, item) {
|
|
200
200
|
const fileService = accessor.get(IFileService);
|
|
201
201
|
const dialogService = accessor.get(IDialogService);
|
|
@@ -207,12 +207,12 @@ async function restore(accessor, item) {
|
|
|
207
207
|
const { confirmed } = await dialogService.confirm({
|
|
208
208
|
type: 'warning',
|
|
209
209
|
message: ( localize(
|
|
210
|
-
|
|
210
|
+
7378,
|
|
211
211
|
"Do you want to restore the contents of '{0}'?",
|
|
212
212
|
basename(entry.workingCopy.resource)
|
|
213
213
|
)),
|
|
214
|
-
detail: ( localize(
|
|
215
|
-
primaryButton: ( localize(
|
|
214
|
+
detail: ( localize(7379, "Restoring will discard any unsaved changes.")),
|
|
215
|
+
primaryButton: ( localize(7380, "&&Restore"))
|
|
216
216
|
});
|
|
217
217
|
if (!confirmed) {
|
|
218
218
|
return;
|
|
@@ -229,7 +229,7 @@ async function restore(accessor, item) {
|
|
|
229
229
|
await fileService.cloneFile(entry.location, entry.workingCopy.resource);
|
|
230
230
|
}
|
|
231
231
|
catch (error) {
|
|
232
|
-
await dialogService.error(( localize(
|
|
232
|
+
await dialogService.error(( localize(7381, "Unable to restore '{0}'.", basename(entry.workingCopy.resource))), toErrorMessage(error));
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
235
|
if (workingCopies) {
|
|
@@ -249,7 +249,7 @@ registerAction2(class extends Action2 {
|
|
|
249
249
|
constructor() {
|
|
250
250
|
super({
|
|
251
251
|
id: 'workbench.action.localHistory.restoreViaPicker',
|
|
252
|
-
title: ( localize2(
|
|
252
|
+
title: ( localize2(7382, 'Find Entry to Restore')),
|
|
253
253
|
f1: true,
|
|
254
254
|
category: LOCAL_HISTORY_CATEGORY,
|
|
255
255
|
precondition: CTX_LOCAL_HISTORY_ENABLED
|
|
@@ -282,7 +282,7 @@ registerAction2(class extends Action2 {
|
|
|
282
282
|
}
|
|
283
283
|
resourcesSortedByRecency.push(...[...resources].sort((r1, r2) => r1.fsPath < r2.fsPath ? -1 : 1));
|
|
284
284
|
resourcePicker.busy = false;
|
|
285
|
-
resourcePicker.placeholder = ( localize(
|
|
285
|
+
resourcePicker.placeholder = ( localize(7383, "Select the file to show local history for"));
|
|
286
286
|
resourcePicker.matchOnLabel = true;
|
|
287
287
|
resourcePicker.matchOnDescription = true;
|
|
288
288
|
resourcePicker.items = ( [...resourcesSortedByRecency].map(resource => ({
|
|
@@ -306,7 +306,7 @@ registerAction2(class extends Action2 {
|
|
|
306
306
|
const entries = await workingCopyHistoryService.getEntries(resource, cts.token);
|
|
307
307
|
entryPicker.busy = false;
|
|
308
308
|
entryPicker.canAcceptInBackground = true;
|
|
309
|
-
entryPicker.placeholder = ( localize(
|
|
309
|
+
entryPicker.placeholder = ( localize(7384, "Select the local history entry to open"));
|
|
310
310
|
entryPicker.matchOnLabel = true;
|
|
311
311
|
entryPicker.matchOnDescription = true;
|
|
312
312
|
entryPicker.items = ( Array.from(entries).reverse().map(entry => ({
|
|
@@ -330,12 +330,12 @@ registerAction2(class extends Action2 {
|
|
|
330
330
|
}));
|
|
331
331
|
}
|
|
332
332
|
});
|
|
333
|
-
MenuRegistry.appendMenuItem(MenuId.TimelineTitle, { command: { id: 'workbench.action.localHistory.restoreViaPicker', title: ( localize2(
|
|
333
|
+
MenuRegistry.appendMenuItem(MenuId.TimelineTitle, { command: { id: 'workbench.action.localHistory.restoreViaPicker', title: ( localize2(7385, 'Local History: Find Entry to Restore...')) }, group: 'submenu', order: 1, when: CTX_LOCAL_HISTORY_ENABLED });
|
|
334
334
|
registerAction2(class extends Action2 {
|
|
335
335
|
constructor() {
|
|
336
336
|
super({
|
|
337
337
|
id: 'workbench.action.localHistory.rename',
|
|
338
|
-
title: ( localize2(
|
|
338
|
+
title: ( localize2(7386, 'Rename')),
|
|
339
339
|
menu: {
|
|
340
340
|
id: MenuId.TimelineItemContext,
|
|
341
341
|
group: '5_edit',
|
|
@@ -351,9 +351,9 @@ registerAction2(class extends Action2 {
|
|
|
351
351
|
if (entry) {
|
|
352
352
|
const disposables = ( new DisposableStore());
|
|
353
353
|
const inputBox = disposables.add(quickInputService.createInputBox());
|
|
354
|
-
inputBox.title = ( localize(
|
|
354
|
+
inputBox.title = ( localize(7387, "Rename Local History Entry"));
|
|
355
355
|
inputBox.ignoreFocusOut = true;
|
|
356
|
-
inputBox.placeholder = ( localize(
|
|
356
|
+
inputBox.placeholder = ( localize(7388, "Enter the new name of the local history entry"));
|
|
357
357
|
inputBox.value = SaveSourceRegistry.getSourceLabel(entry.source);
|
|
358
358
|
inputBox.show();
|
|
359
359
|
disposables.add(inputBox.onDidAccept(() => {
|
|
@@ -369,7 +369,7 @@ registerAction2(class extends Action2 {
|
|
|
369
369
|
constructor() {
|
|
370
370
|
super({
|
|
371
371
|
id: 'workbench.action.localHistory.delete',
|
|
372
|
-
title: ( localize2(
|
|
372
|
+
title: ( localize2(7389, 'Delete')),
|
|
373
373
|
menu: {
|
|
374
374
|
id: MenuId.TimelineItemContext,
|
|
375
375
|
group: '5_edit',
|
|
@@ -387,13 +387,13 @@ registerAction2(class extends Action2 {
|
|
|
387
387
|
const { confirmed } = await dialogService.confirm({
|
|
388
388
|
type: 'warning',
|
|
389
389
|
message: ( localize(
|
|
390
|
-
|
|
390
|
+
7390,
|
|
391
391
|
"Do you want to delete the local history entry of '{0}' from {1}?",
|
|
392
392
|
entry.workingCopy.name,
|
|
393
393
|
toLocalHistoryEntryDateLabel(entry.timestamp)
|
|
394
394
|
)),
|
|
395
|
-
detail: ( localize(
|
|
396
|
-
primaryButton: ( localize(
|
|
395
|
+
detail: ( localize(7391, "This action is irreversible!")),
|
|
396
|
+
primaryButton: ( localize(7392, "&&Delete")),
|
|
397
397
|
});
|
|
398
398
|
if (!confirmed) {
|
|
399
399
|
return;
|
|
@@ -407,7 +407,7 @@ registerAction2(class extends Action2 {
|
|
|
407
407
|
constructor() {
|
|
408
408
|
super({
|
|
409
409
|
id: 'workbench.action.localHistory.deleteAll',
|
|
410
|
-
title: ( localize2(
|
|
410
|
+
title: ( localize2(7393, 'Delete All')),
|
|
411
411
|
f1: true,
|
|
412
412
|
category: LOCAL_HISTORY_CATEGORY,
|
|
413
413
|
precondition: CTX_LOCAL_HISTORY_ENABLED
|
|
@@ -418,9 +418,9 @@ registerAction2(class extends Action2 {
|
|
|
418
418
|
const workingCopyHistoryService = accessor.get(IWorkingCopyHistoryService);
|
|
419
419
|
const { confirmed } = await dialogService.confirm({
|
|
420
420
|
type: 'warning',
|
|
421
|
-
message: ( localize(
|
|
422
|
-
detail: ( localize(
|
|
423
|
-
primaryButton: ( localize(
|
|
421
|
+
message: ( localize(7394, "Do you want to delete all entries of all files in local history?")),
|
|
422
|
+
detail: ( localize(7395, "This action is irreversible!")),
|
|
423
|
+
primaryButton: ( localize(7396, "&&Delete All")),
|
|
424
424
|
});
|
|
425
425
|
if (!confirmed) {
|
|
426
426
|
return;
|
|
@@ -432,7 +432,7 @@ registerAction2(class extends Action2 {
|
|
|
432
432
|
constructor() {
|
|
433
433
|
super({
|
|
434
434
|
id: 'workbench.action.localHistory.create',
|
|
435
|
-
title: ( localize2(
|
|
435
|
+
title: ( localize2(7397, 'Create Entry')),
|
|
436
436
|
f1: true,
|
|
437
437
|
category: LOCAL_HISTORY_CATEGORY,
|
|
438
438
|
precondition: ( ContextKeyExpr.and(CTX_LOCAL_HISTORY_ENABLED, ActiveEditorContext))
|
|
@@ -450,10 +450,10 @@ registerAction2(class extends Action2 {
|
|
|
450
450
|
}
|
|
451
451
|
const disposables = ( new DisposableStore());
|
|
452
452
|
const inputBox = disposables.add(quickInputService.createInputBox());
|
|
453
|
-
inputBox.title = ( localize(
|
|
453
|
+
inputBox.title = ( localize(7398, "Create Local History Entry"));
|
|
454
454
|
inputBox.ignoreFocusOut = true;
|
|
455
455
|
inputBox.placeholder = ( localize(
|
|
456
|
-
|
|
456
|
+
7399,
|
|
457
457
|
"Enter the new name of the local history entry for '{0}'",
|
|
458
458
|
labelService.getUriBasenameLabel(resource)
|
|
459
459
|
));
|
|
@@ -472,7 +472,7 @@ async function openEntry(entry, editorService, options) {
|
|
|
472
472
|
await editorService.openEditor({
|
|
473
473
|
resource,
|
|
474
474
|
label: ( localize(
|
|
475
|
-
|
|
475
|
+
7400,
|
|
476
476
|
"{0} ({1} • {2})",
|
|
477
477
|
entry.workingCopy.name,
|
|
478
478
|
SaveSourceRegistry.getSourceLabel(entry.source),
|
|
@@ -494,7 +494,7 @@ function toDiffEditorArguments(arg1, arg2, options) {
|
|
|
494
494
|
const resource = arg2;
|
|
495
495
|
modifiedResource = resource;
|
|
496
496
|
label = ( localize(
|
|
497
|
-
|
|
497
|
+
7401,
|
|
498
498
|
"{0} ({1} • {2}) ↔ {3}",
|
|
499
499
|
arg1.workingCopy.name,
|
|
500
500
|
SaveSourceRegistry.getSourceLabel(arg1.source),
|
|
@@ -506,7 +506,7 @@ function toDiffEditorArguments(arg1, arg2, options) {
|
|
|
506
506
|
const modified = arg2;
|
|
507
507
|
modifiedResource = LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({ location: modified.location, associatedResource: modified.workingCopy.resource });
|
|
508
508
|
label = ( localize(
|
|
509
|
-
|
|
509
|
+
7402,
|
|
510
510
|
"{0} ({1} • {2}) ↔ {3} ({4} • {5})",
|
|
511
511
|
arg1.workingCopy.name,
|
|
512
512
|
SaveSourceRegistry.getSourceLabel(arg1.source),
|
|
@@ -35,7 +35,7 @@ let LocalHistoryTimeline = class LocalHistoryTimeline extends Disposable {
|
|
|
35
35
|
this.configurationService = configurationService;
|
|
36
36
|
this.contextService = contextService;
|
|
37
37
|
this.id = 'timeline.localHistory';
|
|
38
|
-
this.label = ( localize(
|
|
38
|
+
this.label = ( localize(7403, "Local History"));
|
|
39
39
|
this.scheme = '*';
|
|
40
40
|
this._onDidChange = this._register(( new Emitter()));
|
|
41
41
|
this.onDidChange = this._onDidChange.event;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.monaco-workbench .timeline-tree-view {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
.monaco-workbench .timeline-tree-view .message.timeline-subtle {
|
|
5
|
+
opacity: 0.5;
|
|
6
|
+
padding: 10px 22px 0 22px;
|
|
7
|
+
position: absolute;
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
z-index: 1;
|
|
10
|
+
}
|
|
11
|
+
.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item .monaco-icon-label {
|
|
12
|
+
flex: 1;
|
|
13
|
+
text-overflow: ellipsis;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item .timeline-timestamp-container {
|
|
17
|
+
margin-left: 2px;
|
|
18
|
+
margin-right: 4px;
|
|
19
|
+
opacity: 0.5;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
text-overflow: ellipsis;
|
|
22
|
+
}
|
|
23
|
+
.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate::before {
|
|
24
|
+
content: ' ';
|
|
25
|
+
position: absolute;
|
|
26
|
+
right: 10px;
|
|
27
|
+
border-right: 1px solid currentColor;
|
|
28
|
+
display: block;
|
|
29
|
+
height: 100%;
|
|
30
|
+
width: 1px;
|
|
31
|
+
opacity: 0.25;
|
|
32
|
+
}
|
|
33
|
+
.timeline-tree-view .monaco-list .monaco-list-row:hover .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate::before,
|
|
34
|
+
.timeline-tree-view .monaco-list .monaco-list-row.selected .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate::before,
|
|
35
|
+
.timeline-tree-view .monaco-list .monaco-list-row.focused .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate::before {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item .timeline-timestamp-container .timeline-timestamp {
|
|
39
|
+
display: inline-block;
|
|
40
|
+
}
|
|
41
|
+
.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate .timeline-timestamp {
|
|
42
|
+
visibility: hidden;
|
|
43
|
+
width: 10px;
|
|
44
|
+
}
|
|
45
|
+
.timeline-tree-view .monaco-list .monaco-list-row:hover .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate .timeline-timestamp,
|
|
46
|
+
.timeline-tree-view .monaco-list .monaco-list-row.selected .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate .timeline-timestamp,
|
|
47
|
+
.timeline-tree-view .monaco-list .monaco-list-row.focused .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate .timeline-timestamp {
|
|
48
|
+
visibility: visible !important;
|
|
49
|
+
width: initial;
|
|
50
|
+
}
|
|
@@ -13,13 +13,13 @@ import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/conf
|
|
|
13
13
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
14
14
|
import { MenuRegistry, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
15
15
|
import { CommandsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands';
|
|
16
|
-
import { ExplorerFolderContext } from '@codingame/monaco-vscode-
|
|
16
|
+
import { ExplorerFolderContext } from '@codingame/monaco-vscode-68b3311c-eb96-5711-8f72-f5f4b2e31932-common/vscode/vs/workbench/contrib/files/common/files';
|
|
17
17
|
import { ResourceContextKey } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
18
18
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
19
19
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
20
20
|
|
|
21
|
-
const timelineViewIcon = registerIcon('timeline-view-icon', Codicon.history, ( localize(
|
|
22
|
-
const timelineOpenIcon = registerIcon('timeline-open', Codicon.history, ( localize(
|
|
21
|
+
const timelineViewIcon = registerIcon('timeline-view-icon', Codicon.history, ( localize(11026, 'View icon of the timeline view.')));
|
|
22
|
+
const timelineOpenIcon = registerIcon('timeline-open', Codicon.history, ( localize(11027, 'Icon for the open timeline action.')));
|
|
23
23
|
class TimelinePaneDescriptor {
|
|
24
24
|
constructor() {
|
|
25
25
|
this.id = TimelinePaneId;
|
|
@@ -40,14 +40,14 @@ const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
|
40
40
|
configurationRegistry.registerConfiguration({
|
|
41
41
|
id: 'timeline',
|
|
42
42
|
order: 1001,
|
|
43
|
-
title: ( localize(
|
|
43
|
+
title: ( localize(11028, "Timeline")),
|
|
44
44
|
type: 'object',
|
|
45
45
|
properties: {
|
|
46
46
|
'timeline.pageSize': {
|
|
47
47
|
type: ['number', 'null'],
|
|
48
48
|
default: 50,
|
|
49
49
|
markdownDescription: ( localize(
|
|
50
|
-
|
|
50
|
+
11029,
|
|
51
51
|
"The number of items to show in the Timeline view by default and when loading more items. Setting to `null` will automatically choose a page size based on the visible area of the Timeline view."
|
|
52
52
|
)),
|
|
53
53
|
},
|
|
@@ -55,7 +55,7 @@ configurationRegistry.registerConfiguration({
|
|
|
55
55
|
type: 'boolean',
|
|
56
56
|
default: true,
|
|
57
57
|
description: ( localize(
|
|
58
|
-
|
|
58
|
+
11030,
|
|
59
59
|
"Controls whether the Timeline view will load the next page of items when you scroll to the end of the list."
|
|
60
60
|
)),
|
|
61
61
|
},
|
|
@@ -65,7 +65,7 @@ configurationRegistry.registerConfiguration({
|
|
|
65
65
|
var OpenTimelineAction;
|
|
66
66
|
(function (OpenTimelineAction) {
|
|
67
67
|
OpenTimelineAction.ID = 'files.openTimeline';
|
|
68
|
-
OpenTimelineAction.LABEL = ( localize(
|
|
68
|
+
OpenTimelineAction.LABEL = ( localize(11031, "Open Timeline"));
|
|
69
69
|
function handler() {
|
|
70
70
|
return (accessor, arg) => {
|
|
71
71
|
const service = accessor.get(ITimelineService);
|
|
@@ -85,10 +85,10 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, ({
|
|
|
85
85
|
},
|
|
86
86
|
when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource, TimelineHasProviderContext))
|
|
87
87
|
}));
|
|
88
|
-
const timelineFilter = registerIcon('timeline-filter', Codicon.filter, ( localize(
|
|
88
|
+
const timelineFilter = registerIcon('timeline-filter', Codicon.filter, ( localize(11032, 'Icon for the filter timeline action.')));
|
|
89
89
|
MenuRegistry.appendMenuItem(MenuId.TimelineTitle, {
|
|
90
90
|
submenu: MenuId.TimelineFilterSubMenu,
|
|
91
|
-
title: ( localize(
|
|
91
|
+
title: ( localize(11033, "Filter Timeline")),
|
|
92
92
|
group: 'navigation',
|
|
93
93
|
order: 100,
|
|
94
94
|
icon: timelineFilter
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import './media/timelinePane.css
|
|
3
|
+
import './media/timelinePane.css';
|
|
4
4
|
import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
5
|
import { clearNode, append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
6
6
|
import { asCSSUrl } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/cssValue';
|
|
@@ -177,7 +177,7 @@ class LoadMoreCommand {
|
|
|
177
177
|
return this.label;
|
|
178
178
|
}
|
|
179
179
|
get label() {
|
|
180
|
-
return this.loading ? ( localize(
|
|
180
|
+
return this.loading ? ( localize(11034, "Loading...")) : ( localize(11035, "Load more"));
|
|
181
181
|
}
|
|
182
182
|
get themeIcon() {
|
|
183
183
|
return undefined;
|
|
@@ -187,7 +187,7 @@ const TimelineFollowActiveEditorContext = ( new RawContextKey('timelineFollowAct
|
|
|
187
187
|
const TimelineExcludeSources = ( new RawContextKey('timelineExcludeSources', '[]', true));
|
|
188
188
|
const TimelineViewFocusedContext = ( new RawContextKey('timelineFocused', true));
|
|
189
189
|
let TimelinePane = class TimelinePane extends ViewPane {
|
|
190
|
-
static { this.TITLE = ( localize2(
|
|
190
|
+
static { this.TITLE = ( localize2(11036, "Timeline")); }
|
|
191
191
|
constructor(options, keybindingService, contextMenuService, contextKeyService, configurationService, storageService, viewDescriptorService, instantiationService, editorService, commandService, progressService, timelineService, openerService, themeService, hoverService, labelService, uriIdentityService, extensionService) {
|
|
192
192
|
super({ ...options, titleMenuId: MenuId.TimelineTitle }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
|
|
193
193
|
this.storageService = storageService;
|
|
@@ -630,7 +630,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
630
630
|
this._isEmpty = !this.hasVisibleItems;
|
|
631
631
|
if (this.uri === undefined) {
|
|
632
632
|
this.updateFilename(undefined);
|
|
633
|
-
this.message = ( localize(
|
|
633
|
+
this.message = ( localize(11037, "The active editor cannot provide timeline information."));
|
|
634
634
|
}
|
|
635
635
|
else if (this._isEmpty) {
|
|
636
636
|
if (this.pendingRequests.size !== 0) {
|
|
@@ -640,24 +640,24 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
640
640
|
this.updateFilename(this.labelService.getUriBasenameLabel(this.uri));
|
|
641
641
|
const scmProviderCount = this.contextKeyService.getContextKeyValue('scm.providerCount');
|
|
642
642
|
if (this.timelineService.getSources().filter(({ id }) => !( this.excludedSources.has(id))).length === 0) {
|
|
643
|
-
this.message = ( localize(
|
|
643
|
+
this.message = ( localize(11038, "All timeline sources have been filtered out."));
|
|
644
644
|
}
|
|
645
645
|
else {
|
|
646
646
|
if (this.configurationService.getValue('workbench.localHistory.enabled') && !( this.excludedSources.has('timeline.localHistory'))) {
|
|
647
647
|
this.message = ( localize(
|
|
648
|
-
|
|
648
|
+
11039,
|
|
649
649
|
"Local History will track recent changes as you save them unless the file has been excluded or is too large."
|
|
650
650
|
));
|
|
651
651
|
}
|
|
652
652
|
else if (this.excludedSources.size > 0) {
|
|
653
|
-
this.message = ( localize(
|
|
653
|
+
this.message = ( localize(11040, "No filtered timeline information was provided."));
|
|
654
654
|
}
|
|
655
655
|
else {
|
|
656
|
-
this.message = ( localize(
|
|
656
|
+
this.message = ( localize(11041, "No timeline information was provided."));
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
659
|
if (!scmProviderCount || scmProviderCount === 0) {
|
|
660
|
-
this.message += ' ' + ( localize(
|
|
660
|
+
this.message += ' ' + ( localize(11042, "Source Control has not been configured."));
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
663
|
}
|
|
@@ -714,7 +714,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
714
714
|
container.classList.add('tree-explorer-viewlet-tree-view', 'timeline-tree-view');
|
|
715
715
|
this.$message = append(this.$container, $('.message'));
|
|
716
716
|
this.$message.classList.add('timeline-subtle');
|
|
717
|
-
this.message = ( localize(
|
|
717
|
+
this.message = ( localize(11037, "The active editor cannot provide timeline information."));
|
|
718
718
|
this.$tree = document.createElement('div');
|
|
719
719
|
this.$tree.classList.add('customview-tree', 'file-icon-themable-tree', 'hide-arrows');
|
|
720
720
|
container.appendChild(this.$tree);
|
|
@@ -731,7 +731,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
731
731
|
if (isLoadMoreCommand(element)) {
|
|
732
732
|
return element.ariaLabel;
|
|
733
733
|
}
|
|
734
|
-
return element.accessibilityInformation ? element.accessibilityInformation.label : ( localize(
|
|
734
|
+
return element.accessibilityInformation ? element.accessibilityInformation.label : ( localize(11043, "{0}: {1}", element.relativeTimeFullWord ?? '', element.label));
|
|
735
735
|
},
|
|
736
736
|
getRole(element) {
|
|
737
737
|
if (isLoadMoreCommand(element)) {
|
|
@@ -740,7 +740,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
740
740
|
return element.accessibilityInformation && element.accessibilityInformation.role ? element.accessibilityInformation.role : 'treeitem';
|
|
741
741
|
},
|
|
742
742
|
getWidgetAriaLabel() {
|
|
743
|
-
return localize(
|
|
743
|
+
return localize(11036, "Timeline");
|
|
744
744
|
}
|
|
745
745
|
},
|
|
746
746
|
keyboardNavigationLabelProvider: ( new TimelineKeyboardNavigationLabelProvider()),
|
|
@@ -800,7 +800,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
800
800
|
setLoadingUriMessage() {
|
|
801
801
|
const file = this.uri && this.labelService.getUriBasenameLabel(this.uri);
|
|
802
802
|
this.updateFilename(file);
|
|
803
|
-
this.message = file ? ( localize(
|
|
803
|
+
this.message = file ? ( localize(11044, "Loading timeline for {0}...", file)) : '';
|
|
804
804
|
}
|
|
805
805
|
onContextMenu(commands, treeEvent) {
|
|
806
806
|
const item = treeEvent.element;
|
|
@@ -990,9 +990,9 @@ TimelineTreeRenderer = ( __decorate([
|
|
|
990
990
|
( __param(1, IInstantiationService)),
|
|
991
991
|
( __param(2, IThemeService))
|
|
992
992
|
], TimelineTreeRenderer));
|
|
993
|
-
const timelineRefresh = registerIcon('timeline-refresh', Codicon.refresh, ( localize(
|
|
994
|
-
const timelinePin = registerIcon('timeline-pin', Codicon.pin, ( localize(
|
|
995
|
-
const timelineUnpin = registerIcon('timeline-unpin', Codicon.pinned, ( localize(
|
|
993
|
+
const timelineRefresh = registerIcon('timeline-refresh', Codicon.refresh, ( localize(11045, 'Icon for the refresh timeline action.')));
|
|
994
|
+
const timelinePin = registerIcon('timeline-pin', Codicon.pin, ( localize(11046, 'Icon for the pin timeline action.')));
|
|
995
|
+
const timelineUnpin = registerIcon('timeline-unpin', Codicon.pinned, ( localize(11047, 'Icon for the unpin timeline action.')));
|
|
996
996
|
let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
997
997
|
constructor(pane, timelineService, storageService, contextKeyService, menuService) {
|
|
998
998
|
super();
|
|
@@ -1006,9 +1006,9 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1006
1006
|
constructor() {
|
|
1007
1007
|
super({
|
|
1008
1008
|
id: 'timeline.refresh',
|
|
1009
|
-
title: ( localize2(
|
|
1009
|
+
title: ( localize2(11048, "Refresh")),
|
|
1010
1010
|
icon: timelineRefresh,
|
|
1011
|
-
category: ( localize2(
|
|
1011
|
+
category: ( localize2(11036, "Timeline")),
|
|
1012
1012
|
menu: {
|
|
1013
1013
|
id: MenuId.TimelineTitle,
|
|
1014
1014
|
group: 'navigation',
|
|
@@ -1024,9 +1024,9 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1024
1024
|
this._register(MenuRegistry.appendMenuItem(MenuId.TimelineTitle, ({
|
|
1025
1025
|
command: {
|
|
1026
1026
|
id: 'timeline.toggleFollowActiveEditor',
|
|
1027
|
-
title: ( localize2(
|
|
1027
|
+
title: ( localize2(11049, 'Pin the Current Timeline')),
|
|
1028
1028
|
icon: timelinePin,
|
|
1029
|
-
category: ( localize2(
|
|
1029
|
+
category: ( localize2(11036, "Timeline")),
|
|
1030
1030
|
},
|
|
1031
1031
|
group: 'navigation',
|
|
1032
1032
|
order: 98,
|
|
@@ -1035,9 +1035,9 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1035
1035
|
this._register(MenuRegistry.appendMenuItem(MenuId.TimelineTitle, ({
|
|
1036
1036
|
command: {
|
|
1037
1037
|
id: 'timeline.toggleFollowActiveEditor',
|
|
1038
|
-
title: ( localize2(
|
|
1038
|
+
title: ( localize2(11050, 'Unpin the Current Timeline')),
|
|
1039
1039
|
icon: timelineUnpin,
|
|
1040
|
-
category: ( localize2(
|
|
1040
|
+
category: ( localize2(11036, "Timeline")),
|
|
1041
1041
|
},
|
|
1042
1042
|
group: 'navigation',
|
|
1043
1043
|
order: 98,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
-
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { Disposable, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
6
6
|
import { TimelinePaneId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/timeline/common/timeline';
|
|
7
7
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
@@ -24,7 +24,7 @@ let TimelineService = class TimelineService extends Disposable {
|
|
|
24
24
|
this._onDidChangeUri = this._register(( new Emitter()));
|
|
25
25
|
this.onDidChangeUri = this._onDidChangeUri.event;
|
|
26
26
|
this.providers = ( new Map());
|
|
27
|
-
this.providerSubscriptions = ( new
|
|
27
|
+
this.providerSubscriptions = this._register(( new DisposableMap()));
|
|
28
28
|
this.hasProviderContext = TimelineHasProviderContext.bindTo(this.contextKeyService);
|
|
29
29
|
this.updateHasProviderContext();
|
|
30
30
|
}
|
|
@@ -90,8 +90,7 @@ let TimelineService = class TimelineService extends Disposable {
|
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
this.providers.delete(id);
|
|
93
|
-
this.providerSubscriptions.
|
|
94
|
-
this.providerSubscriptions.delete(id);
|
|
93
|
+
this.providerSubscriptions.deleteAndDispose(id);
|
|
95
94
|
this.updateHasProviderContext();
|
|
96
95
|
this._onDidChangeProviders.fire({ removed: [id] });
|
|
97
96
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import n from '@codingame/monaco-vscode-api/external/rollup-plugin-styles/dist/runtime/inject-css';
|
|
2
|
-
|
|
3
|
-
var css = ".monaco-workbench .timeline-tree-view{position:relative}.monaco-workbench .timeline-tree-view .message.timeline-subtle{opacity:.5;padding:10px 22px 0;pointer-events:none;position:absolute;z-index:1}.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item .monaco-icon-label{flex:1;overflow:hidden;text-overflow:ellipsis}.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item .timeline-timestamp-container{margin-left:2px;margin-right:4px;opacity:.5;overflow:hidden;text-overflow:ellipsis}.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate:before{border-right:1px solid;content:\" \";display:block;height:100%;opacity:.25;position:absolute;right:10px;width:1px}.timeline-tree-view .monaco-list .monaco-list-row.focused .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate:before,.timeline-tree-view .monaco-list .monaco-list-row.selected .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate:before,.timeline-tree-view .monaco-list .monaco-list-row:hover .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate:before{display:none}.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item .timeline-timestamp-container .timeline-timestamp{display:inline-block}.timeline-tree-view .monaco-list .monaco-list-row .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate .timeline-timestamp{visibility:hidden;width:10px}.timeline-tree-view .monaco-list .monaco-list-row.focused .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate .timeline-timestamp,.timeline-tree-view .monaco-list .monaco-list-row.selected .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate .timeline-timestamp,.timeline-tree-view .monaco-list .monaco-list-row:hover .custom-view-tree-node-item .timeline-timestamp-container.timeline-timestamp--duplicate .timeline-timestamp{visibility:visible!important;width:auto}";
|
|
4
|
-
n(css,{});
|
|
5
|
-
|
|
6
|
-
export { css, css as default };
|