@codingame/monaco-vscode-timeline-service-override 31.0.0 → 32.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/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/timeline.contribution.js +8 -9
- package/vscode/src/vs/workbench/contrib/timeline/browser/timelinePane.js +21 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-timeline-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - timeline service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "32.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
|
@@ -25,7 +25,7 @@ function getLocalHistoryDateFormatter() {
|
|
|
25
25
|
}
|
|
26
26
|
const LOCAL_HISTORY_MENU_CONTEXT_VALUE = "localHistory:item";
|
|
27
27
|
const LOCAL_HISTORY_MENU_CONTEXT_KEY = ( ContextKeyExpr.equals("timelineItem", LOCAL_HISTORY_MENU_CONTEXT_VALUE));
|
|
28
|
-
const LOCAL_HISTORY_ICON_ENTRY = registerIcon("localHistory-icon", Codicon.circleOutline, ( localize(
|
|
29
|
-
const LOCAL_HISTORY_ICON_RESTORE = registerIcon("localHistory-restore", Codicon.check, ( localize(
|
|
28
|
+
const LOCAL_HISTORY_ICON_ENTRY = registerIcon("localHistory-icon", Codicon.circleOutline, ( localize(10609, "Icon for a local history entry in the timeline view.")));
|
|
29
|
+
const LOCAL_HISTORY_ICON_RESTORE = registerIcon("localHistory-restore", Codicon.check, ( localize(10610, "Icon for restoring contents of a local history entry.")));
|
|
30
30
|
|
|
31
31
|
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(10611, "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(10612, "Compare with File"));
|
|
37
37
|
registerAction2(class extends Action2 {
|
|
38
38
|
constructor() {
|
|
39
39
|
super({
|
|
@@ -65,7 +65,7 @@ registerAction2(class extends Action2 {
|
|
|
65
65
|
constructor() {
|
|
66
66
|
super({
|
|
67
67
|
id: "workbench.action.localHistory.compareWithPrevious",
|
|
68
|
-
title: ( localize2(
|
|
68
|
+
title: ( localize2(10613, "Compare with Previous")),
|
|
69
69
|
menu: {
|
|
70
70
|
id: MenuId.TimelineItemContext,
|
|
71
71
|
group: "1_compare",
|
|
@@ -96,7 +96,7 @@ registerAction2(class extends Action2 {
|
|
|
96
96
|
constructor() {
|
|
97
97
|
super({
|
|
98
98
|
id: "workbench.action.localHistory.selectForCompare",
|
|
99
|
-
title: ( localize2(
|
|
99
|
+
title: ( localize2(10614, "Select for Compare")),
|
|
100
100
|
menu: {
|
|
101
101
|
id: MenuId.TimelineItemContext,
|
|
102
102
|
group: "2_compare_with",
|
|
@@ -121,7 +121,7 @@ registerAction2(class extends Action2 {
|
|
|
121
121
|
constructor() {
|
|
122
122
|
super({
|
|
123
123
|
id: "workbench.action.localHistory.compareWithSelected",
|
|
124
|
-
title: ( localize2(
|
|
124
|
+
title: ( localize2(10615, "Compare with Selected")),
|
|
125
125
|
menu: {
|
|
126
126
|
id: MenuId.TimelineItemContext,
|
|
127
127
|
group: "2_compare_with",
|
|
@@ -155,7 +155,7 @@ registerAction2(class extends Action2 {
|
|
|
155
155
|
constructor() {
|
|
156
156
|
super({
|
|
157
157
|
id: "workbench.action.localHistory.open",
|
|
158
|
-
title: ( localize2(
|
|
158
|
+
title: ( localize2(10616, "Show Contents")),
|
|
159
159
|
menu: {
|
|
160
160
|
id: MenuId.TimelineItemContext,
|
|
161
161
|
group: "3_contents",
|
|
@@ -175,7 +175,7 @@ registerAction2(class extends Action2 {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
|
-
const RESTORE_CONTENTS_LABEL = ( localize2(
|
|
178
|
+
const RESTORE_CONTENTS_LABEL = ( localize2(10617, "Restore Contents"));
|
|
179
179
|
registerAction2(class extends Action2 {
|
|
180
180
|
constructor() {
|
|
181
181
|
super({
|
|
@@ -218,7 +218,7 @@ registerAction2(class extends Action2 {
|
|
|
218
218
|
return restore(accessor, item);
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
|
-
const restoreSaveSource = SaveSourceRegistry.registerSource("localHistoryRestore.source", ( localize(
|
|
221
|
+
const restoreSaveSource = SaveSourceRegistry.registerSource("localHistoryRestore.source", ( localize(10618, "File Restored")));
|
|
222
222
|
async function restore(accessor, item) {
|
|
223
223
|
const fileService = accessor.get(IFileService);
|
|
224
224
|
const dialogService = accessor.get(IDialogService);
|
|
@@ -234,12 +234,12 @@ async function restore(accessor, item) {
|
|
|
234
234
|
} = await dialogService.confirm({
|
|
235
235
|
type: "warning",
|
|
236
236
|
message: ( localize(
|
|
237
|
-
|
|
237
|
+
10619,
|
|
238
238
|
"Do you want to restore the contents of '{0}'?",
|
|
239
239
|
basename(entry.workingCopy.resource)
|
|
240
240
|
)),
|
|
241
|
-
detail: ( localize(
|
|
242
|
-
primaryButton: ( localize(
|
|
241
|
+
detail: ( localize(10620, "Restoring will discard any unsaved changes.")),
|
|
242
|
+
primaryButton: ( localize(10621, "&&Restore"))
|
|
243
243
|
});
|
|
244
244
|
if (!confirmed) {
|
|
245
245
|
return;
|
|
@@ -257,7 +257,7 @@ async function restore(accessor, item) {
|
|
|
257
257
|
try {
|
|
258
258
|
await fileService.cloneFile(entry.location, entry.workingCopy.resource);
|
|
259
259
|
} catch (error) {
|
|
260
|
-
await dialogService.error(( localize(
|
|
260
|
+
await dialogService.error(( localize(10622, "Unable to restore '{0}'.", basename(entry.workingCopy.resource))), toErrorMessage(error));
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
263
263
|
if (workingCopies) {
|
|
@@ -281,7 +281,7 @@ registerAction2(class extends Action2 {
|
|
|
281
281
|
constructor() {
|
|
282
282
|
super({
|
|
283
283
|
id: "workbench.action.localHistory.restoreViaPicker",
|
|
284
|
-
title: ( localize2(
|
|
284
|
+
title: ( localize2(10623, "Find Entry to Restore")),
|
|
285
285
|
f1: true,
|
|
286
286
|
category: LOCAL_HISTORY_CATEGORY,
|
|
287
287
|
precondition: CTX_LOCAL_HISTORY_ENABLED
|
|
@@ -318,7 +318,7 @@ registerAction2(class extends Action2 {
|
|
|
318
318
|
}
|
|
319
319
|
resourcesSortedByRecency.push(...[...resources].sort((r1, r2) => r1.fsPath < r2.fsPath ? -1 : 1));
|
|
320
320
|
resourcePicker.busy = false;
|
|
321
|
-
resourcePicker.placeholder = ( localize(
|
|
321
|
+
resourcePicker.placeholder = ( localize(10624, "Select the file to show local history for"));
|
|
322
322
|
resourcePicker.matchOnLabel = true;
|
|
323
323
|
resourcePicker.matchOnDescription = true;
|
|
324
324
|
resourcePicker.items = ( [...resourcesSortedByRecency].map(resource => ({
|
|
@@ -344,7 +344,7 @@ registerAction2(class extends Action2 {
|
|
|
344
344
|
const entries = await workingCopyHistoryService.getEntries(resource, cts.token);
|
|
345
345
|
entryPicker.busy = false;
|
|
346
346
|
entryPicker.canAcceptInBackground = true;
|
|
347
|
-
entryPicker.placeholder = ( localize(
|
|
347
|
+
entryPicker.placeholder = ( localize(10625, "Select the local history entry to open"));
|
|
348
348
|
entryPicker.matchOnLabel = true;
|
|
349
349
|
entryPicker.matchOnDescription = true;
|
|
350
350
|
entryPicker.items = ( Array.from(entries).reverse().map(entry => ({
|
|
@@ -378,7 +378,7 @@ registerAction2(class extends Action2 {
|
|
|
378
378
|
MenuRegistry.appendMenuItem(MenuId.TimelineTitle, {
|
|
379
379
|
command: {
|
|
380
380
|
id: "workbench.action.localHistory.restoreViaPicker",
|
|
381
|
-
title: ( localize2(
|
|
381
|
+
title: ( localize2(10626, "Local History: Find Entry to Restore..."))
|
|
382
382
|
},
|
|
383
383
|
group: "submenu",
|
|
384
384
|
order: 1,
|
|
@@ -388,7 +388,7 @@ registerAction2(class extends Action2 {
|
|
|
388
388
|
constructor() {
|
|
389
389
|
super({
|
|
390
390
|
id: "workbench.action.localHistory.rename",
|
|
391
|
-
title: ( localize2(
|
|
391
|
+
title: ( localize2(10627, "Rename")),
|
|
392
392
|
menu: {
|
|
393
393
|
id: MenuId.TimelineItemContext,
|
|
394
394
|
group: "5_edit",
|
|
@@ -406,9 +406,9 @@ registerAction2(class extends Action2 {
|
|
|
406
406
|
if (entry) {
|
|
407
407
|
const disposables = ( new DisposableStore());
|
|
408
408
|
const inputBox = disposables.add(quickInputService.createInputBox());
|
|
409
|
-
inputBox.title = ( localize(
|
|
409
|
+
inputBox.title = ( localize(10628, "Rename Local History Entry"));
|
|
410
410
|
inputBox.ignoreFocusOut = true;
|
|
411
|
-
inputBox.placeholder = ( localize(
|
|
411
|
+
inputBox.placeholder = ( localize(10629, "Enter the new name of the local history entry"));
|
|
412
412
|
inputBox.value = SaveSourceRegistry.getSourceLabel(entry.source);
|
|
413
413
|
inputBox.show();
|
|
414
414
|
disposables.add(inputBox.onDidAccept(() => {
|
|
@@ -426,7 +426,7 @@ registerAction2(class extends Action2 {
|
|
|
426
426
|
constructor() {
|
|
427
427
|
super({
|
|
428
428
|
id: "workbench.action.localHistory.delete",
|
|
429
|
-
title: ( localize2(
|
|
429
|
+
title: ( localize2(10630, "Delete")),
|
|
430
430
|
menu: {
|
|
431
431
|
id: MenuId.TimelineItemContext,
|
|
432
432
|
group: "5_edit",
|
|
@@ -448,13 +448,13 @@ registerAction2(class extends Action2 {
|
|
|
448
448
|
} = await dialogService.confirm({
|
|
449
449
|
type: "warning",
|
|
450
450
|
message: ( localize(
|
|
451
|
-
|
|
451
|
+
10631,
|
|
452
452
|
"Do you want to delete the local history entry of '{0}' from {1}?",
|
|
453
453
|
entry.workingCopy.name,
|
|
454
454
|
toLocalHistoryEntryDateLabel(entry.timestamp)
|
|
455
455
|
)),
|
|
456
|
-
detail: ( localize(
|
|
457
|
-
primaryButton: ( localize(
|
|
456
|
+
detail: ( localize(10632, "This action is irreversible!")),
|
|
457
|
+
primaryButton: ( localize(10633, "&&Delete"))
|
|
458
458
|
});
|
|
459
459
|
if (!confirmed) {
|
|
460
460
|
return;
|
|
@@ -468,7 +468,7 @@ registerAction2(class extends Action2 {
|
|
|
468
468
|
constructor() {
|
|
469
469
|
super({
|
|
470
470
|
id: "workbench.action.localHistory.deleteAll",
|
|
471
|
-
title: ( localize2(
|
|
471
|
+
title: ( localize2(10634, "Delete All")),
|
|
472
472
|
f1: true,
|
|
473
473
|
category: LOCAL_HISTORY_CATEGORY,
|
|
474
474
|
precondition: CTX_LOCAL_HISTORY_ENABLED
|
|
@@ -481,9 +481,9 @@ registerAction2(class extends Action2 {
|
|
|
481
481
|
confirmed
|
|
482
482
|
} = await dialogService.confirm({
|
|
483
483
|
type: "warning",
|
|
484
|
-
message: ( localize(
|
|
485
|
-
detail: ( localize(
|
|
486
|
-
primaryButton: ( localize(
|
|
484
|
+
message: ( localize(10635, "Do you want to delete all entries of all files in local history?")),
|
|
485
|
+
detail: ( localize(10636, "This action is irreversible!")),
|
|
486
|
+
primaryButton: ( localize(10637, "&&Delete All"))
|
|
487
487
|
});
|
|
488
488
|
if (!confirmed) {
|
|
489
489
|
return;
|
|
@@ -495,7 +495,7 @@ registerAction2(class extends Action2 {
|
|
|
495
495
|
constructor() {
|
|
496
496
|
super({
|
|
497
497
|
id: "workbench.action.localHistory.create",
|
|
498
|
-
title: ( localize2(
|
|
498
|
+
title: ( localize2(10638, "Create Entry")),
|
|
499
499
|
f1: true,
|
|
500
500
|
category: LOCAL_HISTORY_CATEGORY,
|
|
501
501
|
precondition: ( ContextKeyExpr.and(CTX_LOCAL_HISTORY_ENABLED, ActiveEditorContext))
|
|
@@ -515,10 +515,10 @@ registerAction2(class extends Action2 {
|
|
|
515
515
|
}
|
|
516
516
|
const disposables = ( new DisposableStore());
|
|
517
517
|
const inputBox = disposables.add(quickInputService.createInputBox());
|
|
518
|
-
inputBox.title = ( localize(
|
|
518
|
+
inputBox.title = ( localize(10639, "Create Local History Entry"));
|
|
519
519
|
inputBox.ignoreFocusOut = true;
|
|
520
520
|
inputBox.placeholder = ( localize(
|
|
521
|
-
|
|
521
|
+
10640,
|
|
522
522
|
"Enter the new name of the local history entry for '{0}'",
|
|
523
523
|
labelService.getUriBasenameLabel(resource)
|
|
524
524
|
));
|
|
@@ -543,7 +543,7 @@ async function openEntry(entry, editorService, options) {
|
|
|
543
543
|
await editorService.openEditor({
|
|
544
544
|
resource,
|
|
545
545
|
label: ( localize(
|
|
546
|
-
|
|
546
|
+
10641,
|
|
547
547
|
"{0} ({1} • {2})",
|
|
548
548
|
entry.workingCopy.name,
|
|
549
549
|
SaveSourceRegistry.getSourceLabel(entry.source),
|
|
@@ -575,7 +575,7 @@ function toDiffEditorArguments(arg1, arg2, options) {
|
|
|
575
575
|
const resource = arg2;
|
|
576
576
|
modifiedResource = resource;
|
|
577
577
|
label = ( localize(
|
|
578
|
-
|
|
578
|
+
10642,
|
|
579
579
|
"{0} ({1} • {2}) ↔ {3}",
|
|
580
580
|
arg1.workingCopy.name,
|
|
581
581
|
SaveSourceRegistry.getSourceLabel(arg1.source),
|
|
@@ -590,7 +590,7 @@ function toDiffEditorArguments(arg1, arg2, options) {
|
|
|
590
590
|
associatedResource: modified.workingCopy.resource
|
|
591
591
|
});
|
|
592
592
|
label = ( localize(
|
|
593
|
-
|
|
593
|
+
10643,
|
|
594
594
|
"{0} ({1} • {2}) ↔ {3} ({4} • {5})",
|
|
595
595
|
arg1.workingCopy.name,
|
|
596
596
|
SaveSourceRegistry.getSourceLabel(arg1.source),
|
|
@@ -49,7 +49,7 @@ let LocalHistoryTimeline = class LocalHistoryTimeline extends Disposable {
|
|
|
49
49
|
this.configurationService = configurationService;
|
|
50
50
|
this.contextService = contextService;
|
|
51
51
|
this.id = "timeline.localHistory";
|
|
52
|
-
this.label = ( localize(
|
|
52
|
+
this.label = ( localize(10644, "Local History"));
|
|
53
53
|
this.scheme = "*";
|
|
54
54
|
this._onDidChange = this._register(( new Emitter()));
|
|
55
55
|
this.onDidChange = this._onDidChange.event;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
3
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
4
|
-
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
5
4
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
6
5
|
import { Extensions as Extensions$1 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
7
6
|
import { VIEW_CONTAINER } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/files/browser/explorerViewlet';
|
|
@@ -19,8 +18,8 @@ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codi
|
|
|
19
18
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
20
19
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
21
20
|
|
|
22
|
-
const timelineViewIcon = registerIcon("timeline-view-icon", Codicon.history, ( localize(
|
|
23
|
-
const timelineOpenIcon = registerIcon("timeline-open", Codicon.history, ( localize(
|
|
21
|
+
const timelineViewIcon = registerIcon("timeline-view-icon", Codicon.history, ( localize(15223, "View icon of the timeline view.")));
|
|
22
|
+
const timelineOpenIcon = registerIcon("timeline-open", Codicon.history, ( localize(15224, "Icon for the open timeline action.")));
|
|
24
23
|
class TimelinePaneDescriptor {
|
|
25
24
|
constructor() {
|
|
26
25
|
this.id = TimelinePaneId;
|
|
@@ -43,14 +42,14 @@ const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
|
43
42
|
configurationRegistry.registerConfiguration({
|
|
44
43
|
id: "timeline",
|
|
45
44
|
order: 1001,
|
|
46
|
-
title: ( localize(
|
|
45
|
+
title: ( localize(15225, "Timeline")),
|
|
47
46
|
type: "object",
|
|
48
47
|
properties: {
|
|
49
48
|
"timeline.pageSize": {
|
|
50
49
|
type: ["number", "null"],
|
|
51
50
|
default: 50,
|
|
52
51
|
markdownDescription: ( localize(
|
|
53
|
-
|
|
52
|
+
15226,
|
|
54
53
|
"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."
|
|
55
54
|
))
|
|
56
55
|
},
|
|
@@ -58,7 +57,7 @@ configurationRegistry.registerConfiguration({
|
|
|
58
57
|
type: "boolean",
|
|
59
58
|
default: true,
|
|
60
59
|
description: ( localize(
|
|
61
|
-
|
|
60
|
+
15227,
|
|
62
61
|
"Controls whether the Timeline view will load the next page of items when you scroll to the end of the list."
|
|
63
62
|
))
|
|
64
63
|
}
|
|
@@ -68,7 +67,7 @@ configurationRegistry.registerConfiguration({
|
|
|
68
67
|
var OpenTimelineAction;
|
|
69
68
|
(function(OpenTimelineAction) {
|
|
70
69
|
OpenTimelineAction.ID = "files.openTimeline";
|
|
71
|
-
OpenTimelineAction.LABEL = ( localize(
|
|
70
|
+
OpenTimelineAction.LABEL = ( localize(15228, "Open Timeline"));
|
|
72
71
|
function handler() {
|
|
73
72
|
return (accessor, arg) => {
|
|
74
73
|
const service = accessor.get(ITimelineService);
|
|
@@ -90,10 +89,10 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, ({
|
|
|
90
89
|
},
|
|
91
90
|
when: ( ContextKeyExpr.and(( ExplorerFolderContext.toNegated()), ResourceContextKey.HasResource, TimelineHasProviderContext))
|
|
92
91
|
}));
|
|
93
|
-
const timelineFilter = registerIcon("timeline-filter", Codicon.filter, ( localize(
|
|
92
|
+
const timelineFilter = registerIcon("timeline-filter", Codicon.filter, ( localize(15229, "Icon for the filter timeline action.")));
|
|
94
93
|
MenuRegistry.appendMenuItem(MenuId.TimelineTitle, {
|
|
95
94
|
submenu: MenuId.TimelineFilterSubMenu,
|
|
96
|
-
title: ( localize(
|
|
95
|
+
title: ( localize(15230, "Filter Timeline")),
|
|
97
96
|
group: "navigation",
|
|
98
97
|
order: 100,
|
|
99
98
|
icon: timelineFilter
|
|
@@ -178,7 +178,7 @@ class LoadMoreCommand {
|
|
|
178
178
|
return this.label;
|
|
179
179
|
}
|
|
180
180
|
get label() {
|
|
181
|
-
return this.loading ? ( localize(
|
|
181
|
+
return this.loading ? ( localize(15231, "Loading...")) : ( localize(15232, "Load more"));
|
|
182
182
|
}
|
|
183
183
|
get themeIcon() {
|
|
184
184
|
return undefined;
|
|
@@ -189,7 +189,7 @@ const TimelineExcludeSources = ( new RawContextKey("timelineExcludeSources", "[]
|
|
|
189
189
|
const TimelineViewFocusedContext = ( new RawContextKey("timelineFocused", true));
|
|
190
190
|
let TimelinePane = class TimelinePane extends ViewPane {
|
|
191
191
|
static {
|
|
192
|
-
this.TITLE = ( localize2(
|
|
192
|
+
this.TITLE = ( localize2(15233, "Timeline"));
|
|
193
193
|
}
|
|
194
194
|
constructor(
|
|
195
195
|
options,
|
|
@@ -684,7 +684,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
684
684
|
this._isEmpty = !this.hasVisibleItems;
|
|
685
685
|
if (this.uri === undefined) {
|
|
686
686
|
this.updateFilename(undefined);
|
|
687
|
-
this.message = ( localize(
|
|
687
|
+
this.message = ( localize(15234, "The active editor cannot provide timeline information."));
|
|
688
688
|
} else if (this._isEmpty) {
|
|
689
689
|
if (this.pendingRequests.size !== 0) {
|
|
690
690
|
this.setLoadingUriMessage();
|
|
@@ -696,21 +696,21 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
696
696
|
id
|
|
697
697
|
}
|
|
698
698
|
) => !( this.excludedSources.has(id))).length === 0) {
|
|
699
|
-
this.message = ( localize(
|
|
699
|
+
this.message = ( localize(15235, "All timeline sources have been filtered out."));
|
|
700
700
|
} else {
|
|
701
701
|
if (this.configurationService.getValue("workbench.localHistory.enabled") && !( this.excludedSources.has("timeline.localHistory"))) {
|
|
702
702
|
this.message = ( localize(
|
|
703
|
-
|
|
703
|
+
15236,
|
|
704
704
|
"Local History will track recent changes as you save them unless the file has been excluded or is too large."
|
|
705
705
|
));
|
|
706
706
|
} else if (this.excludedSources.size > 0) {
|
|
707
|
-
this.message = ( localize(
|
|
707
|
+
this.message = ( localize(15237, "No filtered timeline information was provided."));
|
|
708
708
|
} else {
|
|
709
|
-
this.message = ( localize(
|
|
709
|
+
this.message = ( localize(15238, "No timeline information was provided."));
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
712
|
if (!scmProviderCount || scmProviderCount === 0) {
|
|
713
|
-
this.message += " " + ( localize(
|
|
713
|
+
this.message += " " + ( localize(15239, "Source Control has not been configured."));
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
716
|
} else {
|
|
@@ -765,7 +765,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
765
765
|
container.classList.add("tree-explorer-viewlet-tree-view", "timeline-tree-view");
|
|
766
766
|
this.$message = append(this.$container, $(".message"));
|
|
767
767
|
this.$message.classList.add("timeline-subtle");
|
|
768
|
-
this.message = ( localize(
|
|
768
|
+
this.message = ( localize(15234, "The active editor cannot provide timeline information."));
|
|
769
769
|
this.$tree = createElement("div");
|
|
770
770
|
this.$tree.classList.add("customview-tree", "file-icon-themable-tree", "hide-arrows");
|
|
771
771
|
container.appendChild(this.$tree);
|
|
@@ -786,7 +786,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
786
786
|
if (isLoadMoreCommand(element)) {
|
|
787
787
|
return element.ariaLabel;
|
|
788
788
|
}
|
|
789
|
-
return element.accessibilityInformation ? element.accessibilityInformation.label : ( localize(
|
|
789
|
+
return element.accessibilityInformation ? element.accessibilityInformation.label : ( localize(15240, "{0}: {1}", element.relativeTimeFullWord ?? "", element.label));
|
|
790
790
|
},
|
|
791
791
|
getRole(element) {
|
|
792
792
|
if (isLoadMoreCommand(element)) {
|
|
@@ -795,7 +795,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
795
795
|
return element.accessibilityInformation && element.accessibilityInformation.role ? element.accessibilityInformation.role : "treeitem";
|
|
796
796
|
},
|
|
797
797
|
getWidgetAriaLabel() {
|
|
798
|
-
return localize(
|
|
798
|
+
return localize(15233, "Timeline");
|
|
799
799
|
}
|
|
800
800
|
},
|
|
801
801
|
keyboardNavigationLabelProvider: ( new TimelineKeyboardNavigationLabelProvider()),
|
|
@@ -858,7 +858,7 @@ let TimelinePane = class TimelinePane extends ViewPane {
|
|
|
858
858
|
setLoadingUriMessage() {
|
|
859
859
|
const file = this.uri && this.labelService.getUriBasenameLabel(this.uri);
|
|
860
860
|
this.updateFilename(file);
|
|
861
|
-
this.message = file ? ( localize(
|
|
861
|
+
this.message = file ? ( localize(15241, "Loading timeline for {0}...", file)) : "";
|
|
862
862
|
}
|
|
863
863
|
onContextMenu(commands, treeEvent) {
|
|
864
864
|
const item = treeEvent.element;
|
|
@@ -1061,9 +1061,9 @@ let TimelineTreeRenderer = class TimelineTreeRenderer extends Disposable {
|
|
|
1061
1061
|
}
|
|
1062
1062
|
};
|
|
1063
1063
|
TimelineTreeRenderer = ( __decorate([( __param(2, IInstantiationService)), ( __param(3, IThemeService))], TimelineTreeRenderer));
|
|
1064
|
-
const timelineRefresh = registerIcon("timeline-refresh", Codicon.refresh, ( localize(
|
|
1065
|
-
const timelinePin = registerIcon("timeline-pin", Codicon.pin, ( localize(
|
|
1066
|
-
const timelineUnpin = registerIcon("timeline-unpin", Codicon.pinned, ( localize(
|
|
1064
|
+
const timelineRefresh = registerIcon("timeline-refresh", Codicon.refresh, ( localize(15242, "Icon for the refresh timeline action.")));
|
|
1065
|
+
const timelinePin = registerIcon("timeline-pin", Codicon.pin, ( localize(15243, "Icon for the pin timeline action.")));
|
|
1066
|
+
const timelineUnpin = registerIcon("timeline-unpin", Codicon.pinned, ( localize(15244, "Icon for the unpin timeline action.")));
|
|
1067
1067
|
let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
1068
1068
|
constructor(pane, timelineService, storageService, contextKeyService, menuService) {
|
|
1069
1069
|
super();
|
|
@@ -1077,9 +1077,9 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1077
1077
|
constructor() {
|
|
1078
1078
|
super({
|
|
1079
1079
|
id: "timeline.refresh",
|
|
1080
|
-
title: ( localize2(
|
|
1080
|
+
title: ( localize2(15245, "Refresh")),
|
|
1081
1081
|
icon: timelineRefresh,
|
|
1082
|
-
category: ( localize2(
|
|
1082
|
+
category: ( localize2(15233, "Timeline")),
|
|
1083
1083
|
menu: {
|
|
1084
1084
|
id: MenuId.TimelineTitle,
|
|
1085
1085
|
group: "navigation",
|
|
@@ -1098,9 +1098,9 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1098
1098
|
this._register(MenuRegistry.appendMenuItem(MenuId.TimelineTitle, ({
|
|
1099
1099
|
command: {
|
|
1100
1100
|
id: "timeline.toggleFollowActiveEditor",
|
|
1101
|
-
title: ( localize2(
|
|
1101
|
+
title: ( localize2(15246, "Pin the Current Timeline")),
|
|
1102
1102
|
icon: timelinePin,
|
|
1103
|
-
category: ( localize2(
|
|
1103
|
+
category: ( localize2(15233, "Timeline"))
|
|
1104
1104
|
},
|
|
1105
1105
|
group: "navigation",
|
|
1106
1106
|
order: 98,
|
|
@@ -1109,9 +1109,9 @@ let TimelinePaneCommands = class TimelinePaneCommands extends Disposable {
|
|
|
1109
1109
|
this._register(MenuRegistry.appendMenuItem(MenuId.TimelineTitle, ({
|
|
1110
1110
|
command: {
|
|
1111
1111
|
id: "timeline.toggleFollowActiveEditor",
|
|
1112
|
-
title: ( localize2(
|
|
1112
|
+
title: ( localize2(15247, "Unpin the Current Timeline")),
|
|
1113
1113
|
icon: timelineUnpin,
|
|
1114
|
-
category: ( localize2(
|
|
1114
|
+
category: ( localize2(15233, "Timeline"))
|
|
1115
1115
|
},
|
|
1116
1116
|
group: "navigation",
|
|
1117
1117
|
order: 98,
|