@codingame/monaco-vscode-views-service-override 1.82.5 → 1.83.0-next.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/assets/index-no-csp.html +2 -1
- package/assets/index.html +3 -2
- package/package.json +3 -3
- package/views.js +1 -1
- package/vscode/src/vs/base/browser/ui/grid/gridview.js +31 -12
- package/vscode/src/vs/base/common/codicons.d.ts +1 -1
- package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +7 -2
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +2 -1
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarActions.js +26 -28
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.d.ts +4 -2
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +19 -8
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +44 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorDropTarget.js +18 -18
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +82 -91
- package/vscode/src/vs/workbench/browser/parts/editor/editorPart.js +15 -13
- package/vscode/src/vs/workbench/browser/parts/editor/{titleControl.js → editorTabsControl.js} +69 -87
- package/vscode/src/vs/workbench/browser/parts/editor/editorTitleControl.js +152 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/{titlecontrol.css.js → editortabscontrol.css.js} +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/media/editortitlecontrol.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/singleeditortabscontrol.css.js +6 -0
- package/vscode/src/vs/workbench/browser/parts/editor/{tabsTitleControl.js → multiEditorTabsControl.js} +265 -252
- package/vscode/src/vs/workbench/browser/parts/editor/multiRowEditorTabsControl.js +152 -0
- package/vscode/src/vs/workbench/browser/parts/editor/{noTabsTitleControl.js → singleEditorTabsControl.js} +39 -31
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +1 -0
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +10 -13
- package/vscode/src/vs/workbench/common/editor/filteredEditorGroupModel.js +109 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +2 -2
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +1 -1
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +11 -0
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +7 -0
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +15 -8
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +9 -14
- package/vscode/src/vs/workbench/browser/parts/editor/media/notabstitlecontrol.css.js +0 -6
- package/vscode/src/vs/workbench/browser/parts/editor/media/tabstitlecontrol.css.js +0 -6
package/assets/index-no-csp.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
|
10
10
|
</head>
|
|
11
11
|
|
|
12
|
-
<body style="margin: 0; overflow: hidden; width: 100%; height: 100
|
|
12
|
+
<body style="margin: 0; overflow: hidden; width: 100%; height: 100%; overscroll-behavior-x: none;" role="document">
|
|
13
13
|
<!-- TODO: Remove additional script tag once Firefox is fixed https://bugzilla.mozilla.org/show_bug.cgi?id=1737882 -->
|
|
14
14
|
<script></script>
|
|
15
15
|
<script async type="module">
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
body {
|
|
94
|
+
overscroll-behavior-x: none;
|
|
94
95
|
background-color: transparent;
|
|
95
96
|
color: var(--vscode-editor-foreground);
|
|
96
97
|
font-family: var(--vscode-font-family);
|
package/assets/index.html
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
<meta charset="UTF-8">
|
|
6
6
|
|
|
7
7
|
<meta http-equiv="Content-Security-Policy"
|
|
8
|
-
content="default-src 'none'; script-src 'sha256-
|
|
8
|
+
content="default-src 'none'; script-src 'sha256-6JpGoG7PLARCKjONYYTGdYKRS+ziu31DUoawja2IO5k=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
|
|
9
9
|
|
|
10
10
|
<!-- Disable pinch zooming -->
|
|
11
11
|
<meta name="viewport"
|
|
12
12
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
|
13
13
|
</head>
|
|
14
14
|
|
|
15
|
-
<body style="margin: 0; overflow: hidden; width: 100%; height: 100
|
|
15
|
+
<body style="margin: 0; overflow: hidden; width: 100%; height: 100%; overscroll-behavior-x: none;" role="document">
|
|
16
16
|
<script async type="module">
|
|
17
17
|
// @ts-check
|
|
18
18
|
/// <reference lib="dom" />
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
body {
|
|
95
|
+
overscroll-behavior-x: none;
|
|
95
96
|
background-color: transparent;
|
|
96
97
|
color: var(--vscode-editor-foreground);
|
|
97
98
|
font-family: var(--vscode-font-family);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-views-service-override",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.83.0-next.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.
|
|
22
|
-
"monaco-editor": "0.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.83.0-next.0",
|
|
22
|
+
"monaco-editor": "0.44.0"
|
|
23
23
|
}
|
|
24
24
|
}
|
package/views.js
CHANGED
|
@@ -257,7 +257,7 @@ function registerCustomView(options) {
|
|
|
257
257
|
const iconUrl = options.icon != null ? ( URI.parse(options.icon)) : undefined;
|
|
258
258
|
const VIEW_CONTAINER = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
259
259
|
id: options.id,
|
|
260
|
-
title: options.name,
|
|
260
|
+
title: { value: options.name, original: options.name },
|
|
261
261
|
order: options.order,
|
|
262
262
|
ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [options.id, { mergeViewWithContainerWhenSingleView: true }]),
|
|
263
263
|
hideIfEmpty: true,
|
|
@@ -245,10 +245,18 @@ class BranchNode {
|
|
|
245
245
|
}
|
|
246
246
|
removeChild(index, sizing) {
|
|
247
247
|
index = validateIndex(index, this.children.length);
|
|
248
|
-
this.splitview.removeView(index, sizing);
|
|
248
|
+
const result = this.splitview.removeView(index, sizing);
|
|
249
249
|
this.children.splice(index, 1);
|
|
250
250
|
this.updateBoundarySashes();
|
|
251
251
|
this.onDidChildrenChange();
|
|
252
|
+
return result;
|
|
253
|
+
}
|
|
254
|
+
removeAllChildren() {
|
|
255
|
+
const result = this.splitview.removeAllViews();
|
|
256
|
+
this.children.splice(0, this.children.length);
|
|
257
|
+
this.updateBoundarySashes();
|
|
258
|
+
this.onDidChildrenChange();
|
|
259
|
+
return result;
|
|
252
260
|
}
|
|
253
261
|
moveChild(from, to) {
|
|
254
262
|
from = validateIndex(from, this.children.length);
|
|
@@ -552,15 +560,18 @@ function flipNode(node, size, orthogonalSize) {
|
|
|
552
560
|
}
|
|
553
561
|
result.addChild(flipNode(child, orthogonalSize, newSize), newSize, 0, true);
|
|
554
562
|
}
|
|
563
|
+
node.dispose();
|
|
555
564
|
return result;
|
|
556
565
|
}
|
|
557
566
|
else {
|
|
558
|
-
|
|
567
|
+
const result = ( new LeafNode(
|
|
559
568
|
node.view,
|
|
560
569
|
orthogonal(node.orientation),
|
|
561
570
|
node.layoutController,
|
|
562
571
|
orthogonalSize
|
|
563
572
|
));
|
|
573
|
+
node.dispose();
|
|
574
|
+
return result;
|
|
564
575
|
}
|
|
565
576
|
}
|
|
566
577
|
class GridView {
|
|
@@ -642,7 +653,13 @@ class GridView {
|
|
|
642
653
|
this.layoutController,
|
|
643
654
|
parent.orthogonalSize
|
|
644
655
|
));
|
|
645
|
-
|
|
656
|
+
try {
|
|
657
|
+
parent.addChild(node, size, index);
|
|
658
|
+
}
|
|
659
|
+
catch (err) {
|
|
660
|
+
node.dispose();
|
|
661
|
+
throw err;
|
|
662
|
+
}
|
|
646
663
|
}
|
|
647
664
|
else {
|
|
648
665
|
const [, grandParent] = tail2(pathToParent);
|
|
@@ -652,7 +669,8 @@ class GridView {
|
|
|
652
669
|
if (typeof newSiblingCachedVisibleSize === 'number') {
|
|
653
670
|
newSiblingSize = Sizing.Invisible(newSiblingCachedVisibleSize);
|
|
654
671
|
}
|
|
655
|
-
grandParent.removeChild(parentIndex);
|
|
672
|
+
const oldChild = grandParent.removeChild(parentIndex);
|
|
673
|
+
oldChild.dispose();
|
|
656
674
|
const newParent = ( new BranchNode(
|
|
657
675
|
parent.orientation,
|
|
658
676
|
parent.layoutController,
|
|
@@ -686,6 +704,7 @@ class GridView {
|
|
|
686
704
|
throw new Error('Invalid location');
|
|
687
705
|
}
|
|
688
706
|
parent.removeChild(index, sizing);
|
|
707
|
+
node.dispose();
|
|
689
708
|
if (parent.children.length === 0) {
|
|
690
709
|
throw new Error('Invalid grid state');
|
|
691
710
|
}
|
|
@@ -699,6 +718,7 @@ class GridView {
|
|
|
699
718
|
return node.view;
|
|
700
719
|
}
|
|
701
720
|
parent.removeChild(0);
|
|
721
|
+
parent.dispose();
|
|
702
722
|
this.root = sibling;
|
|
703
723
|
this.boundarySashes = this.boundarySashes;
|
|
704
724
|
this.trySet2x2();
|
|
@@ -706,16 +726,16 @@ class GridView {
|
|
|
706
726
|
}
|
|
707
727
|
const [, grandParent] = tail2(pathToParent);
|
|
708
728
|
const [, parentIndex] = tail2(rest);
|
|
709
|
-
const sibling = parent.children[0];
|
|
710
729
|
const isSiblingVisible = parent.isChildVisible(0);
|
|
711
|
-
parent.removeChild(0);
|
|
730
|
+
const sibling = parent.removeChild(0);
|
|
712
731
|
const sizes = ( grandParent.children.map((_, i) => grandParent.getChildSize(i)));
|
|
713
732
|
grandParent.removeChild(parentIndex, sizing);
|
|
733
|
+
parent.dispose();
|
|
714
734
|
if (sibling instanceof BranchNode) {
|
|
715
735
|
sizes.splice(parentIndex, 1, ...( sibling.children.map(c => c.size)));
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
grandParent.addChild(
|
|
736
|
+
const siblingChildren = sibling.removeAllChildren();
|
|
737
|
+
for (let i = 0; i < siblingChildren.length; i++) {
|
|
738
|
+
grandParent.addChild(siblingChildren[i], siblingChildren[i].size, parentIndex + i);
|
|
719
739
|
}
|
|
720
740
|
}
|
|
721
741
|
else {
|
|
@@ -728,6 +748,7 @@ class GridView {
|
|
|
728
748
|
const sizing = isSiblingVisible ? sibling.orthogonalSize : Sizing.Invisible(sibling.orthogonalSize);
|
|
729
749
|
grandParent.addChild(newSibling, sizing, parentIndex);
|
|
730
750
|
}
|
|
751
|
+
sibling.dispose();
|
|
731
752
|
for (let i = 0; i < sizes.length; i++) {
|
|
732
753
|
grandParent.resizeChild(i, sizes[i]);
|
|
733
754
|
}
|
|
@@ -970,9 +991,7 @@ class GridView {
|
|
|
970
991
|
dispose() {
|
|
971
992
|
this.onDidSashResetRelay.dispose();
|
|
972
993
|
this.root.dispose();
|
|
973
|
-
|
|
974
|
-
this.element.parentElement.removeChild(this.element);
|
|
975
|
-
}
|
|
994
|
+
this.element.parentElement?.removeChild(this.element);
|
|
976
995
|
}
|
|
977
996
|
}
|
|
978
997
|
|
|
@@ -289,7 +289,7 @@ declare const Codicon: {
|
|
|
289
289
|
readonly note: ThemeIcon;
|
|
290
290
|
readonly octoface: ThemeIcon;
|
|
291
291
|
readonly openPreview: ThemeIcon;
|
|
292
|
-
readonly
|
|
292
|
+
readonly package: ThemeIcon;
|
|
293
293
|
readonly paintcan: ThemeIcon;
|
|
294
294
|
readonly pin: ThemeIcon;
|
|
295
295
|
readonly play: ThemeIcon;
|
|
@@ -42,9 +42,14 @@ type IWorkbenchToolBarOptions = IToolBarOptions & {
|
|
|
42
42
|
/** This is controlled by the WorkbenchToolBar */
|
|
43
43
|
allowContextMenu?: never;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Controls the overflow behavior of the primary group of toolbar. This isthe maximum number of items and id of
|
|
46
|
+
* items that should never overflow
|
|
47
|
+
*
|
|
46
48
|
*/
|
|
47
|
-
|
|
49
|
+
overflowBehavior?: {
|
|
50
|
+
maxItems: number;
|
|
51
|
+
exempted?: string[];
|
|
52
|
+
};
|
|
48
53
|
};
|
|
49
54
|
/**
|
|
50
55
|
* The `WorkbenchToolBar` does
|
|
@@ -463,7 +463,8 @@ let ViewsExtensionHandler = class ViewsExtensionHandler {
|
|
|
463
463
|
if (!viewContainer) {
|
|
464
464
|
viewContainer = this.viewContainersRegistry.registerViewContainer({
|
|
465
465
|
id,
|
|
466
|
-
title,
|
|
466
|
+
title: { value: title, original: title },
|
|
467
|
+
extensionId,
|
|
467
468
|
ctorDescriptor: ( new SyncDescriptor(ViewPaneContainer, [id, { mergeViewWithContainerWhenSingleView: true }])),
|
|
468
469
|
hideIfEmpty: true,
|
|
469
470
|
order,
|
|
@@ -26,7 +26,6 @@ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/st
|
|
|
26
26
|
import { IHoverService } from 'vscode/vscode/vs/workbench/services/hover/browser/hover';
|
|
27
27
|
import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/common/keybinding.js';
|
|
28
28
|
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite';
|
|
29
|
-
import { ICredentialsService } from 'vscode/vscode/vs/platform/credentials/common/credentials';
|
|
30
29
|
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
31
30
|
import { StandardMouseEvent } from 'monaco-editor/esm/vs/base/browser/mouseEvent.js';
|
|
32
31
|
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
@@ -34,6 +33,7 @@ import { ISecretStorageService } from 'vscode/vscode/vs/platform/secrets/common/
|
|
|
34
33
|
import { ILifecycleService } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
35
34
|
import { runWhenIdle } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
36
35
|
import { Lazy } from 'monaco-editor/esm/vs/base/common/lazy.js';
|
|
36
|
+
import { DEFAULT_ICON } from '../../../services/userDataProfile/common/userDataProfileIcons.js';
|
|
37
37
|
|
|
38
38
|
var ViewContainerActivityAction_1, AccountsActivityActionViewItem_1;
|
|
39
39
|
let ViewContainerActivityAction = class ViewContainerActivityAction extends ActivityAction {
|
|
@@ -181,20 +181,19 @@ MenuActivityActionViewItem = ( __decorate([
|
|
|
181
181
|
let AccountsActivityActionViewItem = class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
|
|
182
182
|
static { AccountsActivityActionViewItem_1 = this; }
|
|
183
183
|
static { this.ACCOUNTS_VISIBILITY_PREFERENCE_KEY = 'workbench.activity.showAccounts'; }
|
|
184
|
-
constructor(action, contextMenuActionsProvider, colors, activityHoverOptions, themeService, lifecycleService, hoverService, contextMenuService, menuService, contextKeyService, authenticationService, environmentService, productService, configurationService, storageService, keybindingService, secretStorageService,
|
|
184
|
+
constructor(action, contextMenuActionsProvider, colors, activityHoverOptions, themeService, lifecycleService, hoverService, contextMenuService, menuService, contextKeyService, authenticationService, environmentService, productService, configurationService, storageService, keybindingService, secretStorageService, logService) {
|
|
185
185
|
super(MenuId.AccountsContext, action, contextMenuActionsProvider, true, colors, activityHoverOptions, themeService, hoverService, menuService, contextMenuService, contextKeyService, configurationService, environmentService, keybindingService);
|
|
186
186
|
this.lifecycleService = lifecycleService;
|
|
187
187
|
this.authenticationService = authenticationService;
|
|
188
188
|
this.productService = productService;
|
|
189
189
|
this.storageService = storageService;
|
|
190
190
|
this.secretStorageService = secretStorageService;
|
|
191
|
-
this.credentialsService = credentialsService;
|
|
192
191
|
this.logService = logService;
|
|
193
192
|
this.groupedAccounts = ( new Map());
|
|
194
193
|
this.problematicProviders = ( new Set());
|
|
195
194
|
this.initialized = false;
|
|
196
195
|
this.sessionFromEmbedder = ( new Lazy(
|
|
197
|
-
() => getCurrentAuthenticationSessionInfo(this.
|
|
196
|
+
() => getCurrentAuthenticationSessionInfo(this.secretStorageService, this.productService)
|
|
198
197
|
));
|
|
199
198
|
this.registerListeners();
|
|
200
199
|
this.initialize();
|
|
@@ -272,7 +271,7 @@ let AccountsActivityActionViewItem = class AccountsActivityActionViewItem extend
|
|
|
272
271
|
if (account.canSignOut) {
|
|
273
272
|
const signOutAction = disposables.add(( new Action('signOut', ( localize('signOut', "Sign Out")), undefined, true, async () => {
|
|
274
273
|
const allSessions = await this.authenticationService.getSessions(providerId);
|
|
275
|
-
const sessionsForAccount = allSessions.filter(s => s.account.
|
|
274
|
+
const sessionsForAccount = allSessions.filter(s => s.account.label === account.label);
|
|
276
275
|
return await this.authenticationService.removeAccountSessions(providerId, account.label, sessionsForAccount);
|
|
277
276
|
})));
|
|
278
277
|
providerSubMenuActions.push(signOutAction);
|
|
@@ -311,31 +310,28 @@ let AccountsActivityActionViewItem = class AccountsActivityActionViewItem extend
|
|
|
311
310
|
}
|
|
312
311
|
async addOrUpdateAccount(providerId, account) {
|
|
313
312
|
let accounts = this.groupedAccounts.get(providerId);
|
|
314
|
-
if (accounts) {
|
|
315
|
-
const existingAccount = accounts.find(a => a.id === account.id);
|
|
316
|
-
if (existingAccount) {
|
|
317
|
-
if (existingAccount.label !== account.label) {
|
|
318
|
-
existingAccount.label = account.label;
|
|
319
|
-
}
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
else {
|
|
313
|
+
if (!accounts) {
|
|
324
314
|
accounts = [];
|
|
325
315
|
this.groupedAccounts.set(providerId, accounts);
|
|
326
316
|
}
|
|
327
317
|
const sessionFromEmbedder = await this.sessionFromEmbedder.value;
|
|
328
|
-
let canSignOut =
|
|
329
|
-
if (
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
318
|
+
let canSignOut = true;
|
|
319
|
+
if (sessionFromEmbedder
|
|
320
|
+
&& !sessionFromEmbedder.canSignOut
|
|
321
|
+
&& ( (await this.authenticationService.getSessions(providerId))
|
|
322
|
+
.some(s => s.id === sessionFromEmbedder.id
|
|
323
|
+
&& s.account.id === account.id))) {
|
|
324
|
+
canSignOut = false;
|
|
325
|
+
}
|
|
326
|
+
const existingAccount = accounts.find(a => a.label === account.label);
|
|
327
|
+
if (existingAccount) {
|
|
328
|
+
if (!canSignOut) {
|
|
329
|
+
existingAccount.canSignOut = canSignOut;
|
|
336
330
|
}
|
|
337
331
|
}
|
|
338
|
-
|
|
332
|
+
else {
|
|
333
|
+
accounts.push({ ...account, canSignOut });
|
|
334
|
+
}
|
|
339
335
|
}
|
|
340
336
|
removeAccount(providerId, account) {
|
|
341
337
|
const accounts = this.groupedAccounts.get(providerId);
|
|
@@ -384,14 +380,12 @@ AccountsActivityActionViewItem = AccountsActivityActionViewItem_1 = ( __decorate
|
|
|
384
380
|
( __param(14, IStorageService)),
|
|
385
381
|
( __param(15, IKeybindingService)),
|
|
386
382
|
( __param(16, ISecretStorageService)),
|
|
387
|
-
( __param(17,
|
|
388
|
-
( __param(18, ILogService))
|
|
383
|
+
( __param(17, ILogService))
|
|
389
384
|
], AccountsActivityActionViewItem));
|
|
390
385
|
let GlobalActivityActionViewItem = class GlobalActivityActionViewItem extends MenuActivityActionViewItem {
|
|
391
386
|
constructor(action, contextMenuActionsProvider, colors, activityHoverOptions, userDataProfileService, themeService, hoverService, menuService, contextMenuService, contextKeyService, configurationService, environmentService, keybindingService) {
|
|
392
387
|
super(MenuId.GlobalActivity, action, contextMenuActionsProvider, true, colors, activityHoverOptions, themeService, hoverService, menuService, contextMenuService, contextKeyService, configurationService, environmentService, keybindingService);
|
|
393
388
|
this.userDataProfileService = userDataProfileService;
|
|
394
|
-
this._register(this.userDataProfileService.onDidChangeCurrentProfile(() => this.updateProfileBadge()));
|
|
395
389
|
}
|
|
396
390
|
render(container) {
|
|
397
391
|
super.render(container);
|
|
@@ -411,7 +405,11 @@ let GlobalActivityActionViewItem = class GlobalActivityActionViewItem extends Me
|
|
|
411
405
|
if (this.action.getBadge()) {
|
|
412
406
|
return;
|
|
413
407
|
}
|
|
414
|
-
this.
|
|
408
|
+
if (!this.userDataProfileService.currentProfile.icon || this.userDataProfileService.currentProfile.icon === DEFAULT_ICON.id) {
|
|
409
|
+
this.profileBadgeContent.classList.toggle('profile-text-overlay', true);
|
|
410
|
+
this.profileBadgeContent.classList.toggle('profile-icon-overlay', false);
|
|
411
|
+
this.profileBadgeContent.textContent = this.userDataProfileService.currentProfile.name.substring(0, 2).toUpperCase();
|
|
412
|
+
}
|
|
415
413
|
show(this.profileBadge);
|
|
416
414
|
}
|
|
417
415
|
updateBadge() {
|
|
@@ -11,6 +11,7 @@ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/
|
|
|
11
11
|
import { IWorkbenchEnvironmentService } from 'vscode/vscode/vs/workbench/services/environment/common/environmentService';
|
|
12
12
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
13
13
|
import { IPaneCompositeSelectorPart, IPaneCompositePart } from 'vscode/vscode/vs/workbench/browser/parts/paneCompositePart';
|
|
14
|
+
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
14
15
|
|
|
15
16
|
declare class ActivitybarPart extends Part implements IPaneCompositeSelectorPart {
|
|
16
17
|
private readonly paneCompositePart;
|
|
@@ -21,12 +22,12 @@ declare class ActivitybarPart extends Part implements IPaneCompositeSelectorPart
|
|
|
21
22
|
private readonly contextKeyService;
|
|
22
23
|
private readonly configurationService;
|
|
23
24
|
private readonly environmentService;
|
|
25
|
+
private readonly userDataProfileService;
|
|
24
26
|
readonly _serviceBrand: undefined;
|
|
25
27
|
private static readonly PINNED_VIEW_CONTAINERS;
|
|
26
28
|
private static readonly PLACEHOLDER_VIEW_CONTAINERS;
|
|
27
29
|
private static readonly ACTION_HEIGHT;
|
|
28
30
|
private static readonly ACCOUNTS_ACTION_INDEX;
|
|
29
|
-
private static readonly GEAR_ICON;
|
|
30
31
|
private static readonly ACCOUNTS_ICON;
|
|
31
32
|
readonly minimumWidth: number;
|
|
32
33
|
readonly maximumWidth: number;
|
|
@@ -49,7 +50,7 @@ declare class ActivitybarPart extends Part implements IPaneCompositeSelectorPart
|
|
|
49
50
|
private readonly location;
|
|
50
51
|
private hasExtensionsRegistered;
|
|
51
52
|
private readonly enabledViewContainersContextKeys;
|
|
52
|
-
constructor(paneCompositePart: IPaneCompositePart, instantiationService: IInstantiationService, layoutService: IWorkbenchLayoutService, themeService: IThemeService, storageService: IStorageService, extensionService: IExtensionService, viewDescriptorService: IViewDescriptorService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, environmentService: IWorkbenchEnvironmentService);
|
|
53
|
+
constructor(paneCompositePart: IPaneCompositePart, instantiationService: IInstantiationService, layoutService: IWorkbenchLayoutService, themeService: IThemeService, storageService: IStorageService, extensionService: IExtensionService, viewDescriptorService: IViewDescriptorService, contextKeyService: IContextKeyService, configurationService: IConfigurationService, environmentService: IWorkbenchEnvironmentService, userDataProfileService: IUserDataProfileService);
|
|
53
54
|
private createCompositeBar;
|
|
54
55
|
private getActivityHoverOptions;
|
|
55
56
|
private getContextMenuActionsForComposite;
|
|
@@ -69,6 +70,7 @@ declare class ActivitybarPart extends Part implements IPaneCompositeSelectorPart
|
|
|
69
70
|
protected createContentArea(parent: HTMLElement): HTMLElement;
|
|
70
71
|
private registerKeyboardNavigationListeners;
|
|
71
72
|
private createGlobalActivityActionBar;
|
|
73
|
+
private createGlobalActivity;
|
|
72
74
|
private toggleAccountsActivity;
|
|
73
75
|
private getCompositeActions;
|
|
74
76
|
private onDidRegisterViewContainers;
|
|
@@ -34,6 +34,8 @@ import { toAction, Separator } from 'monaco-editor/esm/vs/base/common/actions.js
|
|
|
34
34
|
import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
|
|
35
35
|
import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
36
36
|
import { StringSHA1 } from 'monaco-editor/esm/vs/base/common/hash.js';
|
|
37
|
+
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
38
|
+
import { DEFAULT_ICON } from '../../../services/userDataProfile/common/userDataProfileIcons.js';
|
|
37
39
|
|
|
38
40
|
var ActivitybarPart_1;
|
|
39
41
|
let ActivitybarPart = class ActivitybarPart extends Part {
|
|
@@ -42,9 +44,8 @@ let ActivitybarPart = class ActivitybarPart extends Part {
|
|
|
42
44
|
static { this.PLACEHOLDER_VIEW_CONTAINERS = 'workbench.activity.placeholderViewlets'; }
|
|
43
45
|
static { this.ACTION_HEIGHT = 48; }
|
|
44
46
|
static { this.ACCOUNTS_ACTION_INDEX = 0; }
|
|
45
|
-
static { this.GEAR_ICON = registerIcon('settings-view-bar-icon', Codicon.settingsGear, ( localize('settingsViewBarIcon', "Settings icon in the view bar."))); }
|
|
46
47
|
static { this.ACCOUNTS_ICON = registerIcon('accounts-view-bar-icon', Codicon.account, ( localize('accountsViewBarIcon', "Accounts icon in the view bar."))); }
|
|
47
|
-
constructor(paneCompositePart, instantiationService, layoutService, themeService, storageService, extensionService, viewDescriptorService, contextKeyService, configurationService, environmentService) {
|
|
48
|
+
constructor(paneCompositePart, instantiationService, layoutService, themeService, storageService, extensionService, viewDescriptorService, contextKeyService, configurationService, environmentService, userDataProfileService) {
|
|
48
49
|
super("workbench.parts.activitybar" , { hasTitle: false }, themeService, storageService, layoutService);
|
|
49
50
|
this.paneCompositePart = paneCompositePart;
|
|
50
51
|
this.instantiationService = instantiationService;
|
|
@@ -54,6 +55,7 @@ let ActivitybarPart = class ActivitybarPart extends Part {
|
|
|
54
55
|
this.contextKeyService = contextKeyService;
|
|
55
56
|
this.configurationService = configurationService;
|
|
56
57
|
this.environmentService = environmentService;
|
|
58
|
+
this.userDataProfileService = userDataProfileService;
|
|
57
59
|
this.minimumWidth = 48;
|
|
58
60
|
this.maximumWidth = 48;
|
|
59
61
|
this.minimumHeight = 0;
|
|
@@ -381,11 +383,12 @@ let ActivitybarPart = class ActivitybarPart extends Part {
|
|
|
381
383
|
animated: false,
|
|
382
384
|
preventLoopNavigation: true
|
|
383
385
|
})));
|
|
384
|
-
this.globalActivityAction = this._register(( new ActivityAction(
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
386
|
+
this.globalActivityAction = this._register(( new ActivityAction(this.createGlobalActivity())));
|
|
387
|
+
this._register(this.userDataProfileService.onDidChangeCurrentProfile(e => {
|
|
388
|
+
if (this.globalActivityAction) {
|
|
389
|
+
this.globalActivityAction.activity = this.createGlobalActivity();
|
|
390
|
+
}
|
|
391
|
+
}));
|
|
389
392
|
if (this.accountsVisibilityPreference) {
|
|
390
393
|
this.accountsActivityAction = this._register(( new ActivityAction({
|
|
391
394
|
id: 'workbench.actions.accounts',
|
|
@@ -396,6 +399,13 @@ let ActivitybarPart = class ActivitybarPart extends Part {
|
|
|
396
399
|
}
|
|
397
400
|
this.globalActivityActionBar.push(this.globalActivityAction);
|
|
398
401
|
}
|
|
402
|
+
createGlobalActivity() {
|
|
403
|
+
return {
|
|
404
|
+
id: 'workbench.actions.manage',
|
|
405
|
+
name: ( localize('manage', "Manage")),
|
|
406
|
+
classNames: ThemeIcon.asClassNameArray(this.userDataProfileService.currentProfile.icon ? ThemeIcon.fromId(this.userDataProfileService.currentProfile.icon) : DEFAULT_ICON),
|
|
407
|
+
};
|
|
408
|
+
}
|
|
399
409
|
toggleAccountsActivity() {
|
|
400
410
|
if (!!this.accountsActivityAction === this.accountsVisibilityPreference) {
|
|
401
411
|
return;
|
|
@@ -779,7 +789,8 @@ ActivitybarPart = ActivitybarPart_1 = ( __decorate([
|
|
|
779
789
|
( __param(6, IViewDescriptorService)),
|
|
780
790
|
( __param(7, IContextKeyService)),
|
|
781
791
|
( __param(8, IConfigurationService)),
|
|
782
|
-
( __param(9, IWorkbenchEnvironmentService))
|
|
792
|
+
( __param(9, IWorkbenchEnvironmentService)),
|
|
793
|
+
( __param(10, IUserDataProfileService))
|
|
783
794
|
], ActivitybarPart));
|
|
784
795
|
|
|
785
796
|
export { ActivitybarPart };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
2
|
|
|
3
|
-
var css = ".monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item{display:block;position:relative}.monaco-workbench .activitybar>.content .composite-bar>.monaco-action-bar .action-item:after,.monaco-workbench .activitybar>.content .composite-bar>.monaco-action-bar .action-item:before{background-color:transparent;content:\"\";display:none;height:2px;position:absolute;transition-delay:.1s;transition-duration:0ms;transition-property:background-color;width:48px}.monaco-workbench .activitybar>.content.dragged-over .composite-bar>.monaco-action-bar .action-item:after,.monaco-workbench .activitybar>.content.dragged-over .composite-bar>.monaco-action-bar .action-item:before{display:block}.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item:before{margin-top:-2px;top:1px}.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item:after{bottom:1px;margin-bottom:-2px}.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item:first-of-type:before{margin-top:-2px;top:2px}.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item:last-of-type:after{bottom:2px;margin-bottom:-2px}.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.bottom:after,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.bottom:before,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.top:after,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.top:before{transition-delay:0s}.monaco-workbench .activitybar>.content.dragged-over-head>.composite-bar>.monaco-action-bar .action-item:first-of-type:before,.monaco-workbench .activitybar>.content.dragged-over-tail>.composite-bar>.monaco-action-bar .action-item:last-of-type:after,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.bottom+.action-item:before,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.top:before,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item:last-of-type.bottom:after{background-color:var(--insert-border-color)}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-label{box-sizing:border-box;display:flex;height:48px;margin-right:0;overflow:hidden;position:relative;width:48px;z-index:1}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-label:not(.codicon){font-size:15px;line-height:40px;padding:0 0 0 48px}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-label.codicon{align-items:center;font-size:24px;justify-content:center}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.active .action-label.codicon,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus .action-label.codicon,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:hover .action-label.codicon{color:var(--vscode-activityBar-foreground)!important}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.active .action-label.uri-icon,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus .action-label.uri-icon,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:hover .action-label.uri-icon{background-color:var(--vscode-activityBar-foreground)!important}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.checked .active-item-indicator:before,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus .active-item-indicator:before{border-left:2px solid;content:\"\";height:100%;position:absolute;top:0;width:0;z-index:1}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.checked .active-item-indicator:before{height:100%;top:0}.monaco-workbench.hc-black .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator.action-item,.monaco-workbench.hc-light .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator{display:none}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.clicked:focus:before{border-left:none!important}.monaco-workbench .activitybar.left>.content :not(.monaco-menu)>.monaco-action-bar .action-item .active-item-indicator:before{left:0}.monaco-workbench .activitybar.right>.content :not(.monaco-menu)>.monaco-action-bar .action-item .active-item-indicator:before{right:0}.monaco-workbench.hc-black .activitybar.left>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus:before,.monaco-workbench.hc-black .activitybar.right>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus:before,.monaco-workbench.hc-light .activitybar.left>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus:before,.monaco-workbench.hc-light .activitybar.right>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus:before{outline:none}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .active-item-indicator,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .badge,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .profile-badge{bottom:0;height:100%;left:0;margin:auto;overflow:hidden;position:absolute;top:0;width:100%}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .active-item-indicator,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .badge{z-index:2}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .profile-badge{z-index:1}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .active-item-indicator{pointer-events:none}.monaco-workbench.border .activitybar.right>.content :not(.monaco-menu)>.monaco-action-bar .active-item-indicator{left:-2px}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .badge .badge-content{border-radius:20px;font-size:9px;font-weight:600;height:16px;line-height:16px;min-width:8px;padding:0 4px;position:absolute;right:8px;text-align:center;top:24px}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .profile-badge .profile-badge-content{background-color:var(--vscode-profileBadge-background);border:2px solid var(--vscode-activityBar-background);border-radius:7px;color:var(--vscode-profileBadge-foreground);font-size:9px;font-weight:600;line-height:10px;padding:2px 3px;position:absolute;right:6px;top:24px}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:active .profile-
|
|
3
|
+
var css = ".monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item{display:block;position:relative}.monaco-workbench .activitybar>.content .composite-bar>.monaco-action-bar .action-item:after,.monaco-workbench .activitybar>.content .composite-bar>.monaco-action-bar .action-item:before{background-color:transparent;content:\"\";display:none;height:2px;position:absolute;transition-delay:.1s;transition-duration:0ms;transition-property:background-color;width:48px}.monaco-workbench .activitybar>.content.dragged-over .composite-bar>.monaco-action-bar .action-item:after,.monaco-workbench .activitybar>.content.dragged-over .composite-bar>.monaco-action-bar .action-item:before{display:block}.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item:before{margin-top:-2px;top:1px}.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item:after{bottom:1px;margin-bottom:-2px}.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item:first-of-type:before{margin-top:-2px;top:2px}.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item:last-of-type:after{bottom:2px;margin-bottom:-2px}.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.bottom:after,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.bottom:before,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.top:after,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.top:before{transition-delay:0s}.monaco-workbench .activitybar>.content.dragged-over-head>.composite-bar>.monaco-action-bar .action-item:first-of-type:before,.monaco-workbench .activitybar>.content.dragged-over-tail>.composite-bar>.monaco-action-bar .action-item:last-of-type:after,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.bottom+.action-item:before,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item.top:before,.monaco-workbench .activitybar>.content>.composite-bar>.monaco-action-bar .action-item:last-of-type.bottom:after{background-color:var(--insert-border-color)}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-label{box-sizing:border-box;display:flex;height:48px;margin-right:0;overflow:hidden;position:relative;width:48px;z-index:1}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-label:not(.codicon){font-size:15px;line-height:40px;padding:0 0 0 48px}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-label.codicon{align-items:center;font-size:24px;justify-content:center}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.active .action-label.codicon,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus .action-label.codicon,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:hover .action-label.codicon{color:var(--vscode-activityBar-foreground)!important}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.active .action-label.uri-icon,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus .action-label.uri-icon,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:hover .action-label.uri-icon{background-color:var(--vscode-activityBar-foreground)!important}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.checked .active-item-indicator:before,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus .active-item-indicator:before{border-left:2px solid;content:\"\";height:100%;position:absolute;top:0;width:0;z-index:1}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.checked .active-item-indicator:before{height:100%;top:0}.monaco-workbench.hc-black .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator.action-item,.monaco-workbench.hc-light .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.checked:not(:focus) .active-item-indicator{display:none}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.clicked:focus:before{border-left:none!important}.monaco-workbench .activitybar.left>.content :not(.monaco-menu)>.monaco-action-bar .action-item .active-item-indicator:before{left:0}.monaco-workbench .activitybar.right>.content :not(.monaco-menu)>.monaco-action-bar .action-item .active-item-indicator:before{right:0}.monaco-workbench.hc-black .activitybar.left>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus:before,.monaco-workbench.hc-black .activitybar.right>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus:before,.monaco-workbench.hc-light .activitybar.left>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus:before,.monaco-workbench.hc-light .activitybar.right>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus:before{outline:none}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .active-item-indicator,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .badge,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .profile-badge{bottom:0;height:100%;left:0;margin:auto;overflow:hidden;position:absolute;top:0;width:100%}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .active-item-indicator,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .badge{z-index:2}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .profile-badge{z-index:1}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .active-item-indicator{pointer-events:none}.monaco-workbench.border .activitybar.right>.content :not(.monaco-menu)>.monaco-action-bar .active-item-indicator{left:-2px}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .badge .badge-content{border-radius:20px;font-size:9px;font-weight:600;height:16px;line-height:16px;min-width:8px;padding:0 4px;position:absolute;right:8px;text-align:center;top:24px}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .profile-badge .profile-icon-overlay{background-color:var(--vscode-activityBar-background);position:absolute;right:6px;top:27px}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .profile-badge .profile-icon-overlay .codicon{color:var(--vscode-activityBar-inactiveForeground)}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item.active .profile-badge .profile-icon-overlay .codicon,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus .profile-badge .profile-icon-overlay .codicon,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:hover .profile-badge .profile-icon-overlay .codicon{color:var(--vscode-activityBar-foreground)!important}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .profile-badge .profile-text-overlay{background-color:var(--vscode-profileBadge-background);border:2px solid var(--vscode-activityBar-background);border-radius:7px;color:var(--vscode-profileBadge-foreground);font-size:9px;font-weight:600;line-height:10px;padding:2px 3px;position:absolute;right:6px;top:24px}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:active .profile-text-overlay,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:focus .profile-text-overlay,.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .action-item:hover .profile-text-overlay{color:var(--vscode-activityBar-foreground)}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .badge .codicon.badge-content{font-size:12px;font-weight:unset;justify-content:center;padding:0}.monaco-workbench .activitybar>.content :not(.monaco-menu)>.monaco-action-bar .badge .codicon.badge-content:before{text-align:center;vertical-align:baseline}.monaco-workbench .activitybar.right>.content :not(.monaco-menu)>.monaco-action-bar .badge,.monaco-workbench .activitybar.right>.content :not(.monaco-menu)>.monaco-action-bar .profile-badge{left:auto;right:0}";
|
|
4
4
|
n(css,{});
|
|
5
5
|
|
|
6
6
|
export { css, css as default };
|
|
@@ -31,6 +31,7 @@ import { Categories } from 'monaco-editor/esm/vs/platform/action/common/actionCo
|
|
|
31
31
|
import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
32
32
|
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
33
33
|
import { defaultBreadcrumbsWidgetStyles } from 'monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js';
|
|
34
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
34
35
|
|
|
35
36
|
var BreadcrumbsControl_1;
|
|
36
37
|
class OutlineItem extends BreadcrumbsItem {
|
|
@@ -405,6 +406,48 @@ BreadcrumbsControl = BreadcrumbsControl_1 = ( __decorate([
|
|
|
405
406
|
( __param(10, IConfigurationService)),
|
|
406
407
|
( __param(11, IBreadcrumbsService))
|
|
407
408
|
], BreadcrumbsControl));
|
|
409
|
+
let BreadcrumbsControlFactory = class BreadcrumbsControlFactory {
|
|
410
|
+
get control() { return this._control; }
|
|
411
|
+
get onDidEnablementChange() { return this._onDidEnablementChange.event; }
|
|
412
|
+
constructor(container, editorGroup, options, configurationService, instantiationService, fileService) {
|
|
413
|
+
this._disposables = ( new DisposableStore());
|
|
414
|
+
this._onDidEnablementChange = this._disposables.add(( new Emitter()));
|
|
415
|
+
const config = this._disposables.add(BreadcrumbsConfig.IsEnabled.bindTo(configurationService));
|
|
416
|
+
this._disposables.add(config.onDidChange(() => {
|
|
417
|
+
const value = config.getValue();
|
|
418
|
+
if (!value && this._control) {
|
|
419
|
+
this._control.dispose();
|
|
420
|
+
this._control = undefined;
|
|
421
|
+
this._onDidEnablementChange.fire();
|
|
422
|
+
}
|
|
423
|
+
else if (value && !this._control) {
|
|
424
|
+
this._control = instantiationService.createInstance(BreadcrumbsControl, container, options, editorGroup);
|
|
425
|
+
this._control.update();
|
|
426
|
+
this._onDidEnablementChange.fire();
|
|
427
|
+
}
|
|
428
|
+
}));
|
|
429
|
+
if (config.getValue()) {
|
|
430
|
+
this._control = instantiationService.createInstance(BreadcrumbsControl, container, options, editorGroup);
|
|
431
|
+
}
|
|
432
|
+
this._disposables.add(fileService.onDidChangeFileSystemProviderRegistrations(e => {
|
|
433
|
+
if (this._control?.model && this._control.model.resource.scheme !== e.scheme) {
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
if (this._control?.update()) {
|
|
437
|
+
this._onDidEnablementChange.fire();
|
|
438
|
+
}
|
|
439
|
+
}));
|
|
440
|
+
}
|
|
441
|
+
dispose() {
|
|
442
|
+
this._disposables.dispose();
|
|
443
|
+
this._control?.dispose();
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
BreadcrumbsControlFactory = ( __decorate([
|
|
447
|
+
( __param(3, IConfigurationService)),
|
|
448
|
+
( __param(4, IInstantiationService)),
|
|
449
|
+
( __param(5, IFileService))
|
|
450
|
+
], BreadcrumbsControlFactory));
|
|
408
451
|
registerAction2(class ToggleBreadcrumb extends Action2 {
|
|
409
452
|
constructor() {
|
|
410
453
|
super({
|
|
@@ -691,4 +734,4 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
|
691
734
|
}
|
|
692
735
|
});
|
|
693
736
|
|
|
694
|
-
export { BreadcrumbsControl };
|
|
737
|
+
export { BreadcrumbsControl, BreadcrumbsControlFactory };
|