@codingame/monaco-vscode-scm-service-override 22.1.9 → 23.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 +13 -15
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +31 -45
- package/vscode/src/vs/workbench/contrib/scm/browser/media/dirtydiffDecorator.css +6 -6
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css +103 -18
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.d.ts +7 -4
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +39 -12
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.js +10 -10
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.js +5 -5
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +126 -89
- package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.js +24 -24
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.d.ts +7 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +180 -115
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +457 -79
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.d.ts +8 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +66 -20
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +93 -74
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.d.ts +15 -5
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +88 -32
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +5 -5
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/common/scmService.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-scm-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - scm service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,20 +15,18 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-
|
|
25
|
-
"@codingame/monaco-vscode-
|
|
26
|
-
"@codingame/monaco-vscode-
|
|
27
|
-
"@codingame/monaco-vscode-
|
|
28
|
-
"@codingame/monaco-vscode-
|
|
29
|
-
"@codingame/monaco-vscode-
|
|
30
|
-
"@codingame/monaco-vscode-ef4149eb-cc74-500f-a75b-c54539f01afa-common": "22.1.9",
|
|
31
|
-
"@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common": "22.1.9"
|
|
18
|
+
"@codingame/monaco-vscode-05c09f77-cd1d-5960-b387-e7023df3160b-common": "23.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-2339d6ac-d6bb-53cd-95ee-81911735d1c7-common": "23.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-262ed59d-4f76-57cd-9e9f-1877f26ae049-common": "23.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-27663a0b-1249-58ba-9085-e52d706b50bc-common": "23.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common": "23.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "23.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "23.0.0",
|
|
25
|
+
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "23.0.0",
|
|
26
|
+
"@codingame/monaco-vscode-aac7027b-326c-513a-95a9-e4eedd151b38-common": "23.0.0",
|
|
27
|
+
"@codingame/monaco-vscode-api": "23.0.0",
|
|
28
|
+
"@codingame/monaco-vscode-bc6f260d-ec63-5c95-9446-1ca7d0872719-common": "23.0.0",
|
|
29
|
+
"@codingame/monaco-vscode-be8ddbb5-094a-5657-b1cc-fe106c94c632-common": "23.0.0"
|
|
32
30
|
},
|
|
33
31
|
"main": "index.js",
|
|
34
32
|
"module": "index.js",
|
|
@@ -4,9 +4,9 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
4
4
|
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
5
5
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { Event, Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
|
-
import { VIEW_PANE_ID } from '@codingame/monaco-vscode-
|
|
7
|
+
import { VIEW_PANE_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm';
|
|
8
8
|
import { ISCMService, ISCMViewService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
9
|
-
import { NumberBadge } from '@codingame/monaco-vscode-
|
|
9
|
+
import { NumberBadge } from '@codingame/monaco-vscode-3b5a5cd1-d4ff-500a-b609-57e0cd4afa0a-common/vscode/vs/workbench/services/activity/common/activity';
|
|
10
10
|
import { IActivityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity.service';
|
|
11
11
|
import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
12
12
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
@@ -18,13 +18,12 @@ import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
18
18
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
19
19
|
import { ITitleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/title/browser/titleService.service';
|
|
20
20
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
21
|
-
import { getRepositoryResourceCount } from '@codingame/monaco-vscode-
|
|
21
|
+
import { getRepositoryResourceCount, getStatusBarCommandGenericName, getSCMRepositoryIcon } from '@codingame/monaco-vscode-bc6f260d-ec63-5c95-9446-1ca7d0872719-common/vscode/vs/workbench/contrib/scm/browser/util';
|
|
22
22
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
23
23
|
import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
24
|
-
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
25
24
|
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
26
25
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
27
|
-
import {
|
|
26
|
+
import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
28
27
|
|
|
29
28
|
const ActiveRepositoryContextKeys = {
|
|
30
29
|
ActiveRepositoryName: ( new RawContextKey('scmActiveRepositoryName', '')),
|
|
@@ -49,8 +48,8 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
49
48
|
this._countBadgeConfig = observableConfigValue('scm.countBadge', 'all', this.configurationService);
|
|
50
49
|
this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => this.scmService.repositories);
|
|
51
50
|
this._activeRepositoryHistoryItemRefName = derived(reader => {
|
|
52
|
-
const
|
|
53
|
-
const historyProvider = repository
|
|
51
|
+
const activeRepository = this.scmViewService.activeRepository.read(reader);
|
|
52
|
+
const historyProvider = activeRepository?.repository.provider.historyProvider.read(reader);
|
|
54
53
|
const historyItemRef = historyProvider?.historyItemRef.read(reader);
|
|
55
54
|
return historyItemRef?.name;
|
|
56
55
|
});
|
|
@@ -64,8 +63,8 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
64
63
|
))];
|
|
65
64
|
}
|
|
66
65
|
case 'focused': {
|
|
67
|
-
const
|
|
68
|
-
return
|
|
66
|
+
const activeRepository = this.scmViewService.activeRepository.read(reader);
|
|
67
|
+
return activeRepository ? [{ provider: activeRepository.repository.provider, resourceCount: this._getRepositoryResourceCount(activeRepository.repository) }] : [];
|
|
69
68
|
}
|
|
70
69
|
case 'off':
|
|
71
70
|
return [];
|
|
@@ -82,19 +81,19 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
82
81
|
}
|
|
83
82
|
return total;
|
|
84
83
|
});
|
|
85
|
-
this._register(
|
|
84
|
+
this._register(autorun(reader => {
|
|
86
85
|
const countBadge = this._countBadge.read(reader);
|
|
87
|
-
this._updateActivityCountBadge(countBadge, store);
|
|
86
|
+
this._updateActivityCountBadge(countBadge, reader.store);
|
|
88
87
|
}));
|
|
89
|
-
this._register(
|
|
90
|
-
const
|
|
91
|
-
const commands = repository
|
|
92
|
-
this._updateStatusBar(
|
|
88
|
+
this._register(autorun(reader => {
|
|
89
|
+
const activeRepository = this.scmViewService.activeRepository.read(reader);
|
|
90
|
+
const commands = activeRepository?.repository.provider.statusBarCommands.read(reader);
|
|
91
|
+
this._updateStatusBar(activeRepository, commands ?? [], reader.store);
|
|
93
92
|
}));
|
|
94
93
|
this._register(autorun(reader => {
|
|
95
|
-
const
|
|
94
|
+
const activeRepository = this.scmViewService.activeRepository.read(reader);
|
|
96
95
|
const historyItemRefName = this._activeRepositoryHistoryItemRefName.read(reader);
|
|
97
|
-
this._updateActiveRepositoryContextKeys(repository
|
|
96
|
+
this._updateActiveRepositoryContextKeys(activeRepository?.repository.provider.name, historyItemRefName);
|
|
98
97
|
}));
|
|
99
98
|
}
|
|
100
99
|
_getRepositoryResourceCount(repository) {
|
|
@@ -104,33 +103,22 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
104
103
|
if (count === 0) {
|
|
105
104
|
return;
|
|
106
105
|
}
|
|
107
|
-
const badge = ( new NumberBadge(count, num => ( localize(
|
|
106
|
+
const badge = ( new NumberBadge(count, num => ( localize(10248, '{0} pending changes', num))));
|
|
108
107
|
store.add(this.activityService.showViewActivity(VIEW_PANE_ID, { badge }));
|
|
109
108
|
}
|
|
110
|
-
_updateStatusBar(
|
|
111
|
-
if (!
|
|
109
|
+
_updateStatusBar(activeRepository, commands, store) {
|
|
110
|
+
if (!activeRepository) {
|
|
112
111
|
return;
|
|
113
112
|
}
|
|
114
|
-
const label = repository.provider.rootUri
|
|
115
|
-
? `${basename(repository.provider.rootUri)} (${repository.provider.label})`
|
|
116
|
-
: repository.provider.label;
|
|
113
|
+
const label = activeRepository.repository.provider.rootUri
|
|
114
|
+
? `${basename(activeRepository.repository.provider.rootUri)} (${activeRepository.repository.provider.label})`
|
|
115
|
+
: activeRepository.repository.provider.label;
|
|
117
116
|
for (let index = 0; index < commands.length; index++) {
|
|
118
117
|
const command = commands[index];
|
|
119
118
|
const tooltip = `${label}${command.tooltip ? ` - ${command.tooltip}` : ''}`;
|
|
120
|
-
|
|
121
|
-
if (repoAgnosticActionName && typeof repoAgnosticActionName === 'string') {
|
|
122
|
-
repoAgnosticActionName = repoAgnosticActionName
|
|
123
|
-
.substring(0, repoAgnosticActionName.lastIndexOf('/'))
|
|
124
|
-
.replace(/^(?:git\.|remoteHub\.)/, '');
|
|
125
|
-
if (repoAgnosticActionName.length > 1) {
|
|
126
|
-
repoAgnosticActionName = repoAgnosticActionName[0].toLocaleUpperCase() + repoAgnosticActionName.slice(1);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
repoAgnosticActionName = '';
|
|
131
|
-
}
|
|
119
|
+
const genericCommandName = getStatusBarCommandGenericName(command);
|
|
132
120
|
const statusbarEntry = {
|
|
133
|
-
name: ( localize(
|
|
121
|
+
name: ( localize(10249, "Source Control")) + (genericCommandName ? ` ${genericCommandName}` : ''),
|
|
134
122
|
text: command.title,
|
|
135
123
|
ariaLabel: tooltip,
|
|
136
124
|
tooltip,
|
|
@@ -141,12 +129,10 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
141
129
|
this.statusbarService.addEntry(statusbarEntry, `status.scm.${index}`, StatusbarAlignment.LEFT, { location: { id: `status.scm.${index - 1}`, priority: 10000 }, alignment: StatusbarAlignment.RIGHT, compact: true }));
|
|
142
130
|
}
|
|
143
131
|
if (this.scmService.repositoryCount > 1) {
|
|
144
|
-
const icon =
|
|
145
|
-
? `$(${repository.provider.iconPath.id})`
|
|
146
|
-
: '$(repo)';
|
|
132
|
+
const icon = getSCMRepositoryIcon(activeRepository, activeRepository.repository);
|
|
147
133
|
const repositoryStatusbarEntry = {
|
|
148
|
-
name: ( localize(
|
|
149
|
-
text: `${icon} ${repository.provider.name}`,
|
|
134
|
+
name: ( localize(10250, "Source Control Provider")),
|
|
135
|
+
text: `$(${icon.id}) ${activeRepository.repository.provider.name}`,
|
|
150
136
|
ariaLabel: label,
|
|
151
137
|
tooltip: label,
|
|
152
138
|
command: 'scm.setActiveProvider'
|
|
@@ -174,12 +160,12 @@ let SCMActiveResourceContextKeyController = class SCMActiveResourceContextKeyCon
|
|
|
174
160
|
this.scmService = scmService;
|
|
175
161
|
this.uriIdentityService = uriIdentityService;
|
|
176
162
|
this._onDidRepositoryChange = ( new Emitter());
|
|
177
|
-
const activeResourceHasChangesContextKey = ( new RawContextKey('scmActiveResourceHasChanges', false, ( localize(
|
|
178
|
-
const activeResourceRepositoryContextKey = ( new RawContextKey('scmActiveResourceRepository', undefined, ( localize(
|
|
163
|
+
const activeResourceHasChangesContextKey = ( new RawContextKey('scmActiveResourceHasChanges', false, ( localize(10251, "Whether the active resource has changes"))));
|
|
164
|
+
const activeResourceRepositoryContextKey = ( new RawContextKey('scmActiveResourceRepository', undefined, ( localize(10252, "The active resource's repository"))));
|
|
179
165
|
this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => this.scmService.repositories);
|
|
180
|
-
this.
|
|
166
|
+
this._register(autorun((reader) => {
|
|
181
167
|
for (const repository of this._repositories.read(reader)) {
|
|
182
|
-
store.add(Event.runAndSubscribe(repository.provider.onDidChangeResources, () => {
|
|
168
|
+
reader.store.add(Event.runAndSubscribe(repository.provider.onDidChangeResources, () => {
|
|
183
169
|
this._onDidRepositoryChange.fire();
|
|
184
170
|
}));
|
|
185
171
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
left: -2px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.monaco-workbench
|
|
19
|
+
.monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-glyph:before {
|
|
20
20
|
transition: width 80ms linear, left 80ms linear, transform 80ms linear;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -101,9 +101,9 @@
|
|
|
101
101
|
background-image: linear-gradient(45deg, var(--vscode-editorGutter-modifiedSecondaryBackground) 25%, var(--vscode-editorGutter-background) 25%, var(--vscode-editorGutter-background) 50%, var(--vscode-editorGutter-modifiedSecondaryBackground) 50%, var(--vscode-editorGutter-modifiedSecondaryBackground) 75%, var(--vscode-editorGutter-background) 75%, var(--vscode-editorGutter-background));
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.monaco-workbench
|
|
105
|
-
.monaco-workbench
|
|
106
|
-
.monaco-workbench
|
|
104
|
+
.monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-added,
|
|
105
|
+
.monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-modified,
|
|
106
|
+
.monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-deleted {
|
|
107
107
|
transition: opacity 0.5s;
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
border-left: 4px solid var(--vscode-editorGutter-deletedSecondaryBackground);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
.monaco-workbench
|
|
137
|
+
.monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-deleted:after {
|
|
138
138
|
transition: border-top-width 80ms linear, border-bottom-width 80ms linear, bottom 80ms linear, opacity 0.5s;
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
background: var(--vscode-editorGutter-deletedSecondaryBackground);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
.monaco-workbench
|
|
156
|
+
.monaco-workbench.monaco-enable-motion .monaco-editor .dirty-diff-deleted:before {
|
|
157
157
|
transition: height 80ms linear;
|
|
158
158
|
}
|
|
159
159
|
|
|
@@ -45,12 +45,19 @@
|
|
|
45
45
|
display: none;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.scm-view .scm-provider .
|
|
49
|
-
|
|
48
|
+
.scm-view .scm-provider > .codicon {
|
|
49
|
+
padding-right: 2px;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.scm-view .scm-provider > .monaco-icon-label {
|
|
53
|
-
|
|
53
|
+
min-width: 0;
|
|
54
|
+
flex: 0 1 auto;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.scm-view .scm-provider > .monaco-icon-label .monaco-icon-name-container {
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
white-space: nowrap;
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
.scm-view .scm-provider .monaco-highlighted-label {
|
|
@@ -59,13 +66,14 @@
|
|
|
59
66
|
font-weight: bold;
|
|
60
67
|
}
|
|
61
68
|
|
|
62
|
-
.scm-view .scm-provider .monaco-highlighted-label .codicon {
|
|
63
|
-
font-size: 14px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
69
|
.scm-view .scm-provider > .actions {
|
|
70
|
+
min-width: 24px;
|
|
71
|
+
flex: 1 10000 auto;
|
|
67
72
|
overflow: hidden;
|
|
68
|
-
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.scm-view .scm-provider > .actions .actions-container {
|
|
76
|
+
justify-content: end;
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
/**
|
|
@@ -78,8 +86,22 @@
|
|
|
78
86
|
align-items: center;
|
|
79
87
|
}
|
|
80
88
|
|
|
81
|
-
.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item
|
|
82
|
-
|
|
89
|
+
.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item.scm-status-bar-action {
|
|
90
|
+
.action-label > span:not(.codicon) {
|
|
91
|
+
margin-left: 2px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item.scm-status-bar-action > .action-label > .codicon {
|
|
96
|
+
display: inline-block;
|
|
97
|
+
vertical-align: middle;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item.scm-status-bar-action > .action-label > span:not(.codicon) {
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
text-overflow: ellipsis;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
min-width: 0;
|
|
83
105
|
}
|
|
84
106
|
|
|
85
107
|
.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item > .action-label,
|
|
@@ -91,7 +113,6 @@
|
|
|
91
113
|
}
|
|
92
114
|
|
|
93
115
|
.scm-view .scm-provider > .actions > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item > .action-label > .codicon {
|
|
94
|
-
font-size: 12px;
|
|
95
116
|
justify-content: center;
|
|
96
117
|
}
|
|
97
118
|
|
|
@@ -144,11 +165,15 @@
|
|
|
144
165
|
height: 22px;
|
|
145
166
|
}
|
|
146
167
|
|
|
147
|
-
.scm-view .monaco-list-row .history-item > .graph-container.current > .graph > circle:last-child
|
|
168
|
+
.scm-view .monaco-list-row .history-item > .graph-container.current > .graph > circle:last-child,
|
|
169
|
+
.scm-view .monaco-list-row .history-item > .graph-container.incoming-changes > .graph > circle:last-child,
|
|
170
|
+
.scm-view .monaco-list-row .history-item > .graph-container.outgoing-changes > .graph > circle:last-child {
|
|
148
171
|
fill: var(--vscode-sideBar-background);
|
|
149
172
|
}
|
|
150
173
|
|
|
151
|
-
.scm-view .monaco-list-row:hover .history-item > .graph-container.current > .graph > circle:last-child
|
|
174
|
+
.scm-view .monaco-list-row:hover .history-item > .graph-container.current > .graph > circle:last-child,
|
|
175
|
+
.scm-view .monaco-list-row:hover .history-item > .graph-container.incoming-changes > .graph > circle:last-child,
|
|
176
|
+
.scm-view .monaco-list-row:hover .history-item > .graph-container.outgoing-changes > .graph > circle:last-child {
|
|
152
177
|
fill: var(--vscode-list-hoverBackground);
|
|
153
178
|
}
|
|
154
179
|
|
|
@@ -160,6 +185,32 @@
|
|
|
160
185
|
stroke: transparent;
|
|
161
186
|
}
|
|
162
187
|
|
|
188
|
+
.scm-view .monaco-list-row:hover .history-item > .graph-container > .graph > circle:nth-of-type(2) {
|
|
189
|
+
stroke: var(--vscode-list-hoverBackground);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.scm-view .monaco-list-row.focused.selected .history-item > .graph-container > .graph > circle:first-of-type {
|
|
193
|
+
stroke: transparent !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.scm-view.scm-history-view > .monaco-list:focus .monaco-list-row.selected .history-item > .graph-container > .graph > circle:nth-of-type(2) {
|
|
197
|
+
stroke: var(--vscode-list-activeSelectionBackground);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.scm-view.scm-history-view > .monaco-list:focus .monaco-list-row.selected .history-item > .graph-container.incoming-changes > .graph > circle:last-child,
|
|
201
|
+
.scm-view.scm-history-view > .monaco-list:focus .monaco-list-row.selected .history-item > .graph-container.outgoing-changes > .graph > circle:last-child {
|
|
202
|
+
fill: var(--vscode-list-activeSelectionBackground);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.scm-view.scm-history-view > .monaco-list .monaco-list-row.focused .history-item > .graph-container > .graph > circle:nth-of-type(2) {
|
|
206
|
+
stroke: var(--vscode-list-inactiveSelectionBackground);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.scm-view.scm-history-view > .monaco-list .monaco-list-row.focused .history-item > .graph-container.incoming-changes > .graph > circle:last-child,
|
|
210
|
+
.scm-view.scm-history-view > .monaco-list .monaco-list-row.focused .history-item > .graph-container.outgoing-changes > .graph > circle:last-child {
|
|
211
|
+
fill: var(--vscode-list-inactiveSelectionBackground);
|
|
212
|
+
}
|
|
213
|
+
|
|
163
214
|
.scm-view .monaco-list-row .history-item > .label-container {
|
|
164
215
|
display: flex;
|
|
165
216
|
flex-shrink: 0;
|
|
@@ -181,9 +232,8 @@
|
|
|
181
232
|
}
|
|
182
233
|
|
|
183
234
|
.scm-view .monaco-list-row .history-item > .label-container > .label > .codicon {
|
|
184
|
-
font-size: 14px;
|
|
185
235
|
color: inherit !important;
|
|
186
|
-
padding:
|
|
236
|
+
padding: 1px;
|
|
187
237
|
}
|
|
188
238
|
|
|
189
239
|
.scm-view .monaco-list-row .history-item > .label-container > .label > .codicon.codicon-git-branch {
|
|
@@ -494,12 +544,49 @@
|
|
|
494
544
|
|
|
495
545
|
/* Repositories */
|
|
496
546
|
|
|
547
|
+
.scm-repositories-view .monaco-list .monaco-list-row .scm-artifact-group > .actions,
|
|
548
|
+
.scm-repositories-view .monaco-list .monaco-list-row .scm-artifact > .actions {
|
|
549
|
+
display: none;
|
|
550
|
+
max-width: fit-content;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.scm-repositories-view .monaco-list .monaco-list-row:hover .scm-artifact-group > .actions,
|
|
554
|
+
.scm-repositories-view .monaco-list .monaco-list-row.focused .scm-artifact-group > .actions,
|
|
555
|
+
.scm-repositories-view .monaco-list .monaco-list-row:hover .scm-artifact > .actions,
|
|
556
|
+
.scm-repositories-view .monaco-list .monaco-list-row.focused .scm-artifact > .actions {
|
|
557
|
+
display: block;
|
|
558
|
+
}
|
|
559
|
+
|
|
497
560
|
.scm-view.scm-repositories-view .monaco-highlighted-label {
|
|
498
561
|
font-weight: normal;
|
|
499
562
|
}
|
|
500
563
|
|
|
501
|
-
.scm-
|
|
564
|
+
.scm-repositories-view .scm-artifact-group,
|
|
565
|
+
.scm-repositories-view .scm-artifact {
|
|
566
|
+
display: flex;
|
|
567
|
+
align-items: center;
|
|
568
|
+
|
|
569
|
+
.icon {
|
|
570
|
+
margin-right: 2px;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.scm-repositories-view .scm-artifact-group .monaco-icon-label,
|
|
575
|
+
.scm-repositories-view .scm-artifact .monaco-icon-label {
|
|
576
|
+
flex-grow: 1;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.scm-repositories-view .scm-artifact-group .monaco-highlighted-label,
|
|
580
|
+
.scm-repositories-view .scm-artifact .monaco-highlighted-label {
|
|
502
581
|
display: flex;
|
|
582
|
+
align-items: center;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.scm-repositories-view .scm-artifact .monaco-icon-description-container {
|
|
586
|
+
min-width: 0;
|
|
587
|
+
overflow: hidden;
|
|
588
|
+
text-overflow: ellipsis;
|
|
589
|
+
white-space: nowrap;
|
|
503
590
|
}
|
|
504
591
|
|
|
505
592
|
/* History item hover */
|
|
@@ -552,7 +639,6 @@
|
|
|
552
639
|
|
|
553
640
|
.monaco-hover.history-item-hover .hover-row.status-bar .action .codicon {
|
|
554
641
|
color: inherit;
|
|
555
|
-
font-size: 12px;
|
|
556
642
|
}
|
|
557
643
|
|
|
558
644
|
/* Graph */
|
|
@@ -595,7 +681,6 @@
|
|
|
595
681
|
|
|
596
682
|
.monaco-toolbar .action-label.scm-graph-repository-picker .codicon,
|
|
597
683
|
.monaco-toolbar .action-label.scm-graph-history-item-picker .codicon {
|
|
598
|
-
font-size: 14px;
|
|
599
684
|
color: inherit;
|
|
600
685
|
}
|
|
601
686
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { IAction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/actions";
|
|
2
|
-
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
3
2
|
import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
4
3
|
import { IMenu } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
|
|
5
4
|
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
6
5
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
7
6
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
|
-
import { ISCMMenus, ISCMProvider, ISCMRepository, ISCMRepositoryMenus, ISCMResource, ISCMResourceGroup } from "@codingame/monaco-vscode-
|
|
7
|
+
import { ISCMMenus, ISCMProvider, ISCMRepository, ISCMRepositoryMenus, ISCMResource, ISCMResourceGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm";
|
|
9
8
|
import { ISCMService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
9
|
+
import { ISCMArtifact, ISCMArtifactGroup } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/artifact";
|
|
10
10
|
export declare class SCMTitleMenu implements IDisposable {
|
|
11
11
|
private _actions;
|
|
12
12
|
get actions(): IAction[];
|
|
13
13
|
private _secondaryActions;
|
|
14
14
|
get secondaryActions(): IAction[];
|
|
15
15
|
private readonly _onDidChangeTitle;
|
|
16
|
-
readonly onDidChangeTitle: Event<void>;
|
|
16
|
+
readonly onDidChangeTitle: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
|
|
17
17
|
readonly menu: IMenu;
|
|
18
18
|
private readonly disposables;
|
|
19
19
|
constructor(menuService: IMenuService, contextKeyService: IContextKeyService);
|
|
@@ -29,9 +29,13 @@ export declare class SCMRepositoryMenus implements ISCMRepositoryMenus, IDisposa
|
|
|
29
29
|
private contextualRepositoryMenus;
|
|
30
30
|
private genericRepositoryContextMenu;
|
|
31
31
|
private contextualRepositoryContextMenus;
|
|
32
|
+
private artifactGroupMenus;
|
|
33
|
+
private artifactMenus;
|
|
32
34
|
private readonly resourceGroupMenusItems;
|
|
33
35
|
private readonly disposables;
|
|
34
36
|
constructor(provider: ISCMProvider, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, menuService: IMenuService);
|
|
37
|
+
getArtifactGroupMenu(artifactGroup: ISCMArtifactGroup): IMenu;
|
|
38
|
+
getArtifactMenu(artifactGroup: ISCMArtifactGroup, artifact: ISCMArtifact): IMenu;
|
|
35
39
|
getRepositoryMenu(repository: ISCMRepository): IMenu;
|
|
36
40
|
getRepositoryContextMenu(repository: ISCMRepository): IMenu;
|
|
37
41
|
getResourceGroupMenu(group: ISCMResourceGroup): IMenu;
|
|
@@ -45,7 +49,6 @@ export declare class SCMMenus implements ISCMMenus, IDisposable {
|
|
|
45
49
|
private instantiationService;
|
|
46
50
|
readonly titleMenu: SCMTitleMenu;
|
|
47
51
|
private readonly disposables;
|
|
48
|
-
private readonly repositoryMenuDisposables;
|
|
49
52
|
private readonly menus;
|
|
50
53
|
constructor(scmService: ISCMService, instantiationService: IInstantiationService);
|
|
51
54
|
private onDidRemoveRepository;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
4
|
import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
5
|
-
import { Emitter
|
|
5
|
+
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
6
|
import { DisposableStore, dispose } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
7
|
import * as scm from './media/scm.css';
|
|
8
8
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
@@ -126,6 +126,8 @@ let SCMRepositoryMenus = class SCMRepositoryMenus {
|
|
|
126
126
|
constructor(provider, contextKeyService, instantiationService, menuService) {
|
|
127
127
|
this.provider = provider;
|
|
128
128
|
this.menuService = menuService;
|
|
129
|
+
this.artifactGroupMenus = ( new Map());
|
|
130
|
+
this.artifactMenus = ( new Map());
|
|
129
131
|
this.resourceGroupMenusItems = ( new Map());
|
|
130
132
|
this.disposables = ( new DisposableStore());
|
|
131
133
|
this.contextKeyService = contextKeyService.createOverlay([
|
|
@@ -140,6 +142,41 @@ let SCMRepositoryMenus = class SCMRepositoryMenus {
|
|
|
140
142
|
provider.onDidChangeResourceGroups(this.onDidChangeResourceGroups, this, this.disposables);
|
|
141
143
|
this.onDidChangeResourceGroups();
|
|
142
144
|
}
|
|
145
|
+
getArtifactGroupMenu(artifactGroup) {
|
|
146
|
+
let item = this.artifactGroupMenus.get(artifactGroup.id);
|
|
147
|
+
if (!item) {
|
|
148
|
+
const contextKeyService = this.contextKeyService.createOverlay([['scmArtifactGroup', artifactGroup.id]]);
|
|
149
|
+
const menu = this.menuService.createMenu(MenuId.SCMArtifactGroupContext, contextKeyService);
|
|
150
|
+
item = {
|
|
151
|
+
menu, dispose() {
|
|
152
|
+
menu.dispose();
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
this.artifactGroupMenus.set(artifactGroup.id, item);
|
|
156
|
+
}
|
|
157
|
+
return item.menu;
|
|
158
|
+
}
|
|
159
|
+
getArtifactMenu(artifactGroup, artifact) {
|
|
160
|
+
const historyProvider = this.provider.historyProvider.get();
|
|
161
|
+
const historyItemRef = historyProvider?.historyItemRef.get();
|
|
162
|
+
const isHistoryItemRef = artifact.id === historyItemRef?.id;
|
|
163
|
+
const key = isHistoryItemRef ? `${artifactGroup.id}|historyItemRef` : artifactGroup.id;
|
|
164
|
+
let item = this.artifactMenus.get(key);
|
|
165
|
+
if (!item) {
|
|
166
|
+
const contextKeyService = this.contextKeyService.createOverlay([
|
|
167
|
+
['scmArtifactGroupId', artifactGroup.id],
|
|
168
|
+
['scmArtifactIsHistoryItemRef', isHistoryItemRef]
|
|
169
|
+
]);
|
|
170
|
+
const menu = this.menuService.createMenu(MenuId.SCMArtifactContext, contextKeyService);
|
|
171
|
+
item = {
|
|
172
|
+
menu, dispose() {
|
|
173
|
+
menu.dispose();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
this.artifactMenus.set(key, item);
|
|
177
|
+
}
|
|
178
|
+
return item.menu;
|
|
179
|
+
}
|
|
143
180
|
getRepositoryMenu(repository) {
|
|
144
181
|
const contextValue = repository.provider.contextValue.get();
|
|
145
182
|
if (typeof contextValue === 'undefined') {
|
|
@@ -237,19 +274,9 @@ let SCMMenus = class SCMMenus {
|
|
|
237
274
|
constructor(scmService, instantiationService) {
|
|
238
275
|
this.instantiationService = instantiationService;
|
|
239
276
|
this.disposables = ( new DisposableStore());
|
|
240
|
-
this.repositoryMenuDisposables = ( new DisposableStore());
|
|
241
277
|
this.menus = ( new Map());
|
|
242
278
|
this.titleMenu = instantiationService.createInstance(SCMTitleMenu);
|
|
243
279
|
scmService.onDidRemoveRepository(this.onDidRemoveRepository, this, this.disposables);
|
|
244
|
-
this.disposables.add(Event.runAndSubscribe(MenuRegistry.onDidChangeMenu, e => {
|
|
245
|
-
if (e && !( e.has(MenuId.SCMTitle))) {
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
this.repositoryMenuDisposables.clear();
|
|
249
|
-
for (const menuItem of MenuRegistry.getMenuItems(MenuId.SCMTitle)) {
|
|
250
|
-
this.repositoryMenuDisposables.add(MenuRegistry.appendMenuItem(MenuId.SCMSourceControlInline, menuItem));
|
|
251
|
-
}
|
|
252
|
-
}));
|
|
253
280
|
}
|
|
254
281
|
onDidRemoveRepository(repository) {
|
|
255
282
|
const menus = this.menus.get(repository.provider);
|
|
@@ -278,7 +305,7 @@ SCMMenus = ( __decorate([
|
|
|
278
305
|
( __param(1, IInstantiationService))
|
|
279
306
|
], SCMMenus));
|
|
280
307
|
MenuRegistry.appendMenuItem(MenuId.SCMResourceContext, {
|
|
281
|
-
title: ( localize(
|
|
308
|
+
title: ( localize(10253, "Share")),
|
|
282
309
|
submenu: MenuId.SCMResourceContextShare,
|
|
283
310
|
group: '45_share',
|
|
284
311
|
order: 3,
|