@codingame/monaco-vscode-user-data-profile-service-override 15.0.2 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +19 -15
- package/vscode/src/vs/base/browser/ui/radio/radio.css +51 -0
- package/vscode/src/vs/base/browser/ui/radio/radio.js +1 -1
- package/vscode/src/vs/platform/userDataProfile/browser/userDataProfile.js +1 -1
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css +349 -0
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +23 -23
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +98 -88
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +45 -35
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +5 -5
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/media/userDataProfileView.css +103 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +1 -1
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +42 -42
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +8 -8
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSyncUtil.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/radio/radio.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/media/userDataProfilesEditor.css.js +0 -6
- package/vscode/src/vs/workbench/services/userDataProfile/browser/media/userDataProfileView.css.js +0 -6
|
@@ -8,7 +8,7 @@ import { IUserDataProfileManagementService } from '@codingame/monaco-vscode-api/
|
|
|
8
8
|
|
|
9
9
|
class CreateTransientProfileAction extends Action2 {
|
|
10
10
|
static { this.ID = 'workbench.profiles.actions.createTemporaryProfile'; }
|
|
11
|
-
static { this.TITLE = ( localize2(
|
|
11
|
+
static { this.TITLE = ( localize2(11158, "Create a Temporary Profile")); }
|
|
12
12
|
constructor() {
|
|
13
13
|
super({
|
|
14
14
|
id: CreateTransientProfileAction.ID,
|
|
@@ -26,7 +26,7 @@ registerAction2(class CleanupProfilesAction extends Action2 {
|
|
|
26
26
|
constructor() {
|
|
27
27
|
super({
|
|
28
28
|
id: 'workbench.profiles.actions.cleanupProfiles',
|
|
29
|
-
title: ( localize2(
|
|
29
|
+
title: ( localize2(11159, "Cleanup Profiles")),
|
|
30
30
|
category: Categories.Developer,
|
|
31
31
|
f1: true,
|
|
32
32
|
});
|
|
@@ -39,7 +39,7 @@ registerAction2(class ResetWorkspacesAction extends Action2 {
|
|
|
39
39
|
constructor() {
|
|
40
40
|
super({
|
|
41
41
|
id: 'workbench.profiles.actions.resetWorkspaces',
|
|
42
|
-
title: ( localize2(
|
|
42
|
+
title: ( localize2(11160, "Reset Workspace Profiles Associations")),
|
|
43
43
|
category: Categories.Developer,
|
|
44
44
|
f1: true,
|
|
45
45
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import './media/userDataProfilesEditor.css
|
|
3
|
+
import './media/userDataProfilesEditor.css';
|
|
4
4
|
import { append, $, Dimension, trackFocus, addDisposableListener, EventType, EventHelper, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
5
|
-
import { SubmenuAction, Separator, Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
5
|
+
import { SubmenuAction, Separator, toAction, Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
6
6
|
import { Event, Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
7
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
8
8
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
@@ -73,9 +73,9 @@ import { DropdownMenuActionViewItem } from '@codingame/monaco-vscode-api/vscode/
|
|
|
73
73
|
import { Orientation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/sash/sash';
|
|
74
74
|
|
|
75
75
|
var UserDataProfilesEditor_1, ExistingProfileResourceTreeRenderer_1, NewProfileResourceTreeRenderer_1, ProfileResourceChildTreeItemRenderer_1, WorkspaceUriHostColumnRenderer_1, WorkspaceUriPathColumnRenderer_1, WorkspaceUriActionsColumnRenderer_1, UserDataProfilesEditorInput_1;
|
|
76
|
-
const editIcon = registerIcon('profiles-editor-edit-folder', Codicon.edit, ( localize(
|
|
77
|
-
const removeIcon = registerIcon('profiles-editor-remove-folder', Codicon.close, ( localize(
|
|
78
|
-
const profilesSashBorder = registerColor('profiles.sashBorder', PANEL_BORDER, ( localize(
|
|
76
|
+
const editIcon = registerIcon('profiles-editor-edit-folder', Codicon.edit, ( localize(11161, 'Icon for the edit folder icon in the profiles editor.')));
|
|
77
|
+
const removeIcon = registerIcon('profiles-editor-remove-folder', Codicon.close, ( localize(11162, 'Icon for the remove folder icon in the profiles editor.')));
|
|
78
|
+
const profilesSashBorder = registerColor('profiles.sashBorder', PANEL_BORDER, ( localize(11163, "The color of the Profiles editor splitview sash border.")));
|
|
79
79
|
const listStyles = getListStyles({
|
|
80
80
|
listActiveSelectionBackground: editorBackground,
|
|
81
81
|
listActiveSelectionForeground: foreground,
|
|
@@ -171,7 +171,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
171
171
|
return profileElement?.name ?? '';
|
|
172
172
|
},
|
|
173
173
|
getWidgetAriaLabel() {
|
|
174
|
-
return localize(
|
|
174
|
+
return localize(11164, "Profiles");
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
177
|
openOnSingleClick: true,
|
|
@@ -192,10 +192,14 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
192
192
|
getActions: () => {
|
|
193
193
|
const actions = [];
|
|
194
194
|
if (this.templates.length) {
|
|
195
|
-
actions.push(( new SubmenuAction('from.template', ( localize(
|
|
195
|
+
actions.push(( new SubmenuAction('from.template', ( localize(11165, "From Template")), this.getCreateFromTemplateActions())));
|
|
196
196
|
actions.push(( new Separator()));
|
|
197
197
|
}
|
|
198
|
-
actions.push((
|
|
198
|
+
actions.push(toAction({
|
|
199
|
+
id: 'importProfile',
|
|
200
|
+
label: ( localize(11166, "Import Profile...")),
|
|
201
|
+
run: () => this.importProfile()
|
|
202
|
+
}));
|
|
199
203
|
return actions;
|
|
200
204
|
}
|
|
201
205
|
},
|
|
@@ -204,17 +208,15 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
204
208
|
supportIcons: true,
|
|
205
209
|
...defaultButtonStyles
|
|
206
210
|
})));
|
|
207
|
-
button.label = ( localize(
|
|
211
|
+
button.label = ( localize(11167, "New Profile"));
|
|
208
212
|
this._register(button.onDidClick(e => this.createNewProfile()));
|
|
209
213
|
}
|
|
210
214
|
getCreateFromTemplateActions() {
|
|
211
|
-
return ( this.templates.map(template => (
|
|
212
|
-
`template:${template.url}`,
|
|
213
|
-
template.name,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
() => this.createNewProfile(( URI.parse(template.url)))
|
|
217
|
-
))));
|
|
215
|
+
return ( this.templates.map(template => toAction({
|
|
216
|
+
id: `template:${template.url}`,
|
|
217
|
+
label: template.name,
|
|
218
|
+
run: () => this.createNewProfile(( URI.parse(template.url)))
|
|
219
|
+
})));
|
|
218
220
|
}
|
|
219
221
|
registerListeners() {
|
|
220
222
|
if (this.profilesList) {
|
|
@@ -249,13 +251,21 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
249
251
|
}
|
|
250
252
|
getTreeContextMenuActions() {
|
|
251
253
|
const actions = [];
|
|
252
|
-
actions.push((
|
|
254
|
+
actions.push(toAction({
|
|
255
|
+
id: 'newProfile',
|
|
256
|
+
label: ( localize(11167, "New Profile")),
|
|
257
|
+
run: () => this.createNewProfile()
|
|
258
|
+
}));
|
|
253
259
|
const templateActions = this.getCreateFromTemplateActions();
|
|
254
260
|
if (templateActions.length) {
|
|
255
|
-
actions.push(( new SubmenuAction('from.template', ( localize(
|
|
261
|
+
actions.push(( new SubmenuAction('from.template', ( localize(11168, "New Profile From Template")), templateActions)));
|
|
256
262
|
}
|
|
257
263
|
actions.push(( new Separator()));
|
|
258
|
-
actions.push((
|
|
264
|
+
actions.push(toAction({
|
|
265
|
+
id: 'importProfile',
|
|
266
|
+
label: ( localize(11166, "Import Profile...")),
|
|
267
|
+
run: () => this.importProfile()
|
|
268
|
+
}));
|
|
259
269
|
return actions;
|
|
260
270
|
}
|
|
261
271
|
async importProfile() {
|
|
@@ -264,13 +274,13 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
264
274
|
const updateQuickPickItems = (value) => {
|
|
265
275
|
const quickPickItems = [];
|
|
266
276
|
if (value) {
|
|
267
|
-
quickPickItems.push({ label: quickPick.value, description: ( localize(
|
|
277
|
+
quickPickItems.push({ label: quickPick.value, description: ( localize(11169, "Import from URL")) });
|
|
268
278
|
}
|
|
269
|
-
quickPickItems.push({ label: ( localize(
|
|
279
|
+
quickPickItems.push({ label: ( localize(11170, "Select File...")) });
|
|
270
280
|
quickPick.items = quickPickItems;
|
|
271
281
|
};
|
|
272
|
-
quickPick.title = ( localize(
|
|
273
|
-
quickPick.placeholder = ( localize(
|
|
282
|
+
quickPick.title = ( localize(11171, "Import from Profile Template..."));
|
|
283
|
+
quickPick.placeholder = ( localize(11172, "Provide Profile Template URL"));
|
|
274
284
|
quickPick.ignoreFocusOut = true;
|
|
275
285
|
disposables.add(quickPick.onDidChangeValue(updateQuickPickItems));
|
|
276
286
|
updateQuickPickItems();
|
|
@@ -305,7 +315,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
305
315
|
canSelectFiles: true,
|
|
306
316
|
canSelectMany: false,
|
|
307
317
|
filters: PROFILE_FILTER,
|
|
308
|
-
title: ( localize(
|
|
318
|
+
title: ( localize(11173, "Select Profile Template File")),
|
|
309
319
|
});
|
|
310
320
|
if (!profileLocation) {
|
|
311
321
|
return null;
|
|
@@ -382,7 +392,7 @@ let ProfileElementRenderer = class ProfileElementRenderer {
|
|
|
382
392
|
const label = append(container, $('.profile-list-item-label'));
|
|
383
393
|
const dirty = append(container, $(`span${ThemeIcon.asCSSSelector(Codicon.circleFilled)}`));
|
|
384
394
|
const description = append(container, $('.profile-list-item-description'));
|
|
385
|
-
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(
|
|
395
|
+
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(11174, "Active"))));
|
|
386
396
|
const actionsContainer = append(container, $('.profile-tree-item-actions-container'));
|
|
387
397
|
const actionBar = disposables.add(this.instantiationService.createInstance(WorkbenchToolBar, actionsContainer, {
|
|
388
398
|
hoverDelegate: disposables.add(createInstantHoverDelegate()),
|
|
@@ -722,15 +732,15 @@ class AbstractProfileResourceTreeRenderer extends Disposable {
|
|
|
722
732
|
getResourceTypeTitle(resourceType) {
|
|
723
733
|
switch (resourceType) {
|
|
724
734
|
case ProfileResourceType.Settings:
|
|
725
|
-
return localize(
|
|
735
|
+
return localize(11175, "Settings");
|
|
726
736
|
case ProfileResourceType.Keybindings:
|
|
727
|
-
return localize(
|
|
737
|
+
return localize(11176, "Keyboard Shortcuts");
|
|
728
738
|
case ProfileResourceType.Snippets:
|
|
729
|
-
return localize(
|
|
739
|
+
return localize(11177, "Snippets");
|
|
730
740
|
case ProfileResourceType.Tasks:
|
|
731
|
-
return localize(
|
|
741
|
+
return localize(11178, "Tasks");
|
|
732
742
|
case ProfileResourceType.Extensions:
|
|
733
|
-
return localize(
|
|
743
|
+
return localize(11179, "Extensions");
|
|
734
744
|
}
|
|
735
745
|
return '';
|
|
736
746
|
}
|
|
@@ -759,18 +769,18 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
759
769
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
760
770
|
let profileElement;
|
|
761
771
|
const nameContainer = append(parent, $('.profile-row-container'));
|
|
762
|
-
append(nameContainer, $('.profile-label-element', undefined, ( localize(
|
|
772
|
+
append(nameContainer, $('.profile-label-element', undefined, ( localize(11180, "Name"))));
|
|
763
773
|
const nameInput = disposables.add(( new InputBox(nameContainer, this.contextViewService, {
|
|
764
774
|
inputBoxStyles: getInputBoxStyle({
|
|
765
775
|
inputBorder: settingsTextInputBorder
|
|
766
776
|
}),
|
|
767
|
-
ariaLabel: ( localize(
|
|
768
|
-
placeholder: ( localize(
|
|
777
|
+
ariaLabel: ( localize(11181, "Profile Name")),
|
|
778
|
+
placeholder: ( localize(11181, "Profile Name")),
|
|
769
779
|
validationOptions: {
|
|
770
780
|
validation: (value) => {
|
|
771
781
|
if (!value) {
|
|
772
782
|
return {
|
|
773
|
-
content: ( localize(
|
|
783
|
+
content: ( localize(11182, "Profile name is required and must be a non-empty value.")),
|
|
774
784
|
type: MessageType.WARNING
|
|
775
785
|
};
|
|
776
786
|
}
|
|
@@ -784,7 +794,7 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
784
794
|
value = value.trim();
|
|
785
795
|
if (initialName !== value && ( this.userDataProfilesService.profiles.some(p => !p.isTransient && p.name === value))) {
|
|
786
796
|
return {
|
|
787
|
-
content: ( localize(
|
|
797
|
+
content: ( localize(11183, "Profile with name {0} already exists.", value)),
|
|
788
798
|
type: MessageType.WARNING
|
|
789
799
|
};
|
|
790
800
|
}
|
|
@@ -814,10 +824,10 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
814
824
|
nameInput.enable();
|
|
815
825
|
}
|
|
816
826
|
if (isDefaultProfile) {
|
|
817
|
-
nameInput.setTooltip(( localize(
|
|
827
|
+
nameInput.setTooltip(( localize(11184, "Name cannot be changed for the default profile")));
|
|
818
828
|
}
|
|
819
829
|
else {
|
|
820
|
-
nameInput.setTooltip(( localize(
|
|
830
|
+
nameInput.setTooltip(( localize(11181, "Profile Name")));
|
|
821
831
|
}
|
|
822
832
|
};
|
|
823
833
|
return {
|
|
@@ -855,9 +865,9 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
855
865
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
856
866
|
let profileElement;
|
|
857
867
|
const iconContainer = append(parent, $('.profile-row-container'));
|
|
858
|
-
append(iconContainer, $('.profile-label-element', undefined, ( localize(
|
|
868
|
+
append(iconContainer, $('.profile-label-element', undefined, ( localize(11185, "Icon"))));
|
|
859
869
|
const iconValueContainer = append(iconContainer, $('.profile-icon-container'));
|
|
860
|
-
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(
|
|
870
|
+
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(11186, "Profile Icon")) }));
|
|
861
871
|
const iconHover = disposables.add(this.hoverService.setupManagedHover(this.hoverDelegate, iconElement, ''));
|
|
862
872
|
const iconSelectBox = disposables.add(this.instantiationService.createInstance(WorkbenchIconSelectBox, { icons: ICONS, inputBoxStyles: defaultInputBoxStyles }));
|
|
863
873
|
let hoverWidget;
|
|
@@ -872,7 +882,7 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
872
882
|
return;
|
|
873
883
|
}
|
|
874
884
|
iconSelectBox.clearInput();
|
|
875
|
-
hoverWidget = this.hoverService.
|
|
885
|
+
hoverWidget = this.hoverService.showInstantHover({
|
|
876
886
|
content: iconSelectBox.domNode,
|
|
877
887
|
target: iconElement,
|
|
878
888
|
position: {
|
|
@@ -916,14 +926,14 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
916
926
|
profileElement.root.icon = selectedIcon.id;
|
|
917
927
|
}
|
|
918
928
|
}));
|
|
919
|
-
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(
|
|
929
|
+
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(11187, "Profile icon to be shown in the activity bar"))));
|
|
920
930
|
const renderIcon = (profileElement) => {
|
|
921
931
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.profile.isDefault) {
|
|
922
932
|
iconValueContainer.classList.add('disabled');
|
|
923
|
-
iconHover.update(( localize(
|
|
933
|
+
iconHover.update(( localize(11188, "Icon cannot be changed for the default profile")));
|
|
924
934
|
}
|
|
925
935
|
else {
|
|
926
|
-
iconHover.update(( localize(
|
|
936
|
+
iconHover.update(( localize(11189, "Click to change icon")));
|
|
927
937
|
iconValueContainer.classList.remove('disabled');
|
|
928
938
|
}
|
|
929
939
|
if (profileElement.root.icon) {
|
|
@@ -963,9 +973,9 @@ let UseForCurrentWindowPropertyRenderer = class UseForCurrentWindowPropertyRende
|
|
|
963
973
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
964
974
|
let profileElement;
|
|
965
975
|
const useForCurrentWindowContainer = append(parent, $('.profile-row-container'));
|
|
966
|
-
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(
|
|
976
|
+
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(11190, "Use for Current Window"))));
|
|
967
977
|
const useForCurrentWindowValueContainer = append(useForCurrentWindowContainer, $('.profile-use-for-current-container'));
|
|
968
|
-
const useForCurrentWindowTitle = ( localize(
|
|
978
|
+
const useForCurrentWindowTitle = ( localize(11191, "Use this profile for the current window"));
|
|
969
979
|
const useForCurrentWindowCheckbox = disposables.add(( new Checkbox(useForCurrentWindowTitle, false, defaultCheckboxStyles)));
|
|
970
980
|
append(useForCurrentWindowValueContainer, useForCurrentWindowCheckbox.domNode);
|
|
971
981
|
const useForCurrentWindowLabel = append(useForCurrentWindowValueContainer, $('.profile-description-element', undefined, useForCurrentWindowTitle));
|
|
@@ -1015,9 +1025,9 @@ class UseAsDefaultProfileRenderer extends ProfilePropertyRenderer {
|
|
|
1015
1025
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1016
1026
|
let profileElement;
|
|
1017
1027
|
const useAsDefaultProfileContainer = append(parent, $('.profile-row-container'));
|
|
1018
|
-
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(
|
|
1028
|
+
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(11192, "Use for New Windows"))));
|
|
1019
1029
|
const useAsDefaultProfileValueContainer = append(useAsDefaultProfileContainer, $('.profile-use-as-default-container'));
|
|
1020
|
-
const useAsDefaultProfileTitle = ( localize(
|
|
1030
|
+
const useAsDefaultProfileTitle = ( localize(11193, "Use this profile as the default for new windows"));
|
|
1021
1031
|
const useAsDefaultProfileCheckbox = disposables.add(( new Checkbox(useAsDefaultProfileTitle, false, defaultCheckboxStyles)));
|
|
1022
1032
|
append(useAsDefaultProfileValueContainer, useAsDefaultProfileCheckbox.domNode);
|
|
1023
1033
|
const useAsDefaultProfileLabel = append(useAsDefaultProfileValueContainer, $('.profile-description-element', undefined, useAsDefaultProfileTitle));
|
|
@@ -1064,11 +1074,11 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1064
1074
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1065
1075
|
let profileElement;
|
|
1066
1076
|
const copyFromContainer = append(parent, $('.profile-row-container.profile-copy-from-container'));
|
|
1067
|
-
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(
|
|
1068
|
-
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(
|
|
1077
|
+
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(11194, "Copy from"))));
|
|
1078
|
+
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(11195, "Select the profile source from which you want to copy contents"))));
|
|
1069
1079
|
const copyFromSelectBox = disposables.add(this.instantiationService.createInstance(SelectBox, [], 0, this.contextViewService, defaultSelectBoxStyles, {
|
|
1070
1080
|
useCustomDrawn: true,
|
|
1071
|
-
ariaLabel: ( localize(
|
|
1081
|
+
ariaLabel: ( localize(11196, "Copy profile from")),
|
|
1072
1082
|
}));
|
|
1073
1083
|
copyFromSelectBox.render(append(copyFromContainer, $('.profile-select-container')));
|
|
1074
1084
|
const render = (profileElement, copyFromOptions) => {
|
|
@@ -1112,19 +1122,19 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1112
1122
|
getCopyFromOptions(profileElement) {
|
|
1113
1123
|
const separator = { text: '\u2500\u2500\u2500\u2500\u2500\u2500', isDisabled: true };
|
|
1114
1124
|
const copyFromOptions = [];
|
|
1115
|
-
copyFromOptions.push({ text: ( localize(
|
|
1125
|
+
copyFromOptions.push({ text: ( localize(11197, "None")) });
|
|
1116
1126
|
for (const [copyFromTemplate, name] of profileElement.copyFromTemplates) {
|
|
1117
1127
|
if (!( this.templates.some(template => this.uriIdentityService.extUri.isEqual(( URI.parse(template.url)), copyFromTemplate)))) {
|
|
1118
1128
|
copyFromOptions.push({ text: `${name} (${basename(copyFromTemplate)})`, id: ( copyFromTemplate.toString()), source: copyFromTemplate });
|
|
1119
1129
|
}
|
|
1120
1130
|
}
|
|
1121
1131
|
if (this.templates.length) {
|
|
1122
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1132
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(11198, "Profile Templates")) });
|
|
1123
1133
|
for (const template of this.templates) {
|
|
1124
1134
|
copyFromOptions.push({ text: template.name, id: template.url, source: ( URI.parse(template.url)) });
|
|
1125
1135
|
}
|
|
1126
1136
|
}
|
|
1127
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1137
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(11199, "Existing Profiles")) });
|
|
1128
1138
|
for (const profile of this.userDataProfilesService.profiles) {
|
|
1129
1139
|
if (!profile.isTransient) {
|
|
1130
1140
|
copyFromOptions.push({ text: profile.name, id: profile.id, source: profile });
|
|
@@ -1156,11 +1166,11 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1156
1166
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1157
1167
|
let profileElement;
|
|
1158
1168
|
const configureRowContainer = append(parent, $('.profile-row-container'));
|
|
1159
|
-
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1169
|
+
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(11200, "Contents"))));
|
|
1160
1170
|
const contentsDescriptionElement = append(configureRowContainer, $('.profile-description-element'));
|
|
1161
1171
|
const contentsTreeHeader = append(configureRowContainer, $('.profile-content-tree-header'));
|
|
1162
|
-
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(
|
|
1163
|
-
append(contentsTreeHeader, $(''), $('', undefined, ( localize(
|
|
1172
|
+
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(11201, "Source"))));
|
|
1173
|
+
append(contentsTreeHeader, $(''), $('', undefined, ( localize(11200, "Contents"))), optionsLabel, $(''));
|
|
1164
1174
|
const delegate = ( new ProfileContentTreeElementDelegate());
|
|
1165
1175
|
const profilesContentTree = this.profilesContentTree = disposables.add(this.instantiationService.createInstance((WorkbenchAsyncDataTree), 'ProfileEditor-ContentsTree', append(configureRowContainer, $('.profile-content-tree.file-icon-themable-tree.show-file-icons')), delegate, [
|
|
1166
1176
|
this.instantiationService.createInstance(ExistingProfileResourceTreeRenderer),
|
|
@@ -1232,27 +1242,27 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1232
1242
|
clearNode(contentsDescriptionElement);
|
|
1233
1243
|
const markdown = ( new MarkdownString());
|
|
1234
1244
|
if (element.root instanceof UserDataProfileElement && element.root.profile.isDefault) {
|
|
1235
|
-
markdown.appendMarkdown(( localize(
|
|
1245
|
+
markdown.appendMarkdown(( localize(11202, "Browse contents of this profile\n")));
|
|
1236
1246
|
}
|
|
1237
1247
|
else {
|
|
1238
|
-
markdown.appendMarkdown(( localize(
|
|
1248
|
+
markdown.appendMarkdown(( localize(11203, "Configure source of contents for this profile\n")));
|
|
1239
1249
|
if (element.root instanceof NewProfileElement) {
|
|
1240
1250
|
const copyFromName = element.root.getCopyFromName();
|
|
1241
1251
|
const optionName = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1242
|
-
? ( localize(
|
|
1252
|
+
? ( localize(11204, "{0} (Copy)", copyFromName))
|
|
1243
1253
|
: copyFromName;
|
|
1244
1254
|
if (optionName) {
|
|
1245
1255
|
markdown
|
|
1246
1256
|
.appendMarkdown(( localize(
|
|
1247
|
-
|
|
1257
|
+
11205,
|
|
1248
1258
|
"- *{0}:* Copy contents from the {1} profile\n",
|
|
1249
1259
|
optionName,
|
|
1250
1260
|
copyFromName
|
|
1251
1261
|
)));
|
|
1252
1262
|
}
|
|
1253
1263
|
markdown
|
|
1254
|
-
.appendMarkdown(( localize(
|
|
1255
|
-
.appendMarkdown(( localize(
|
|
1264
|
+
.appendMarkdown(( localize(11206, "- *Default:* Use contents from the Default profile\n")))
|
|
1265
|
+
.appendMarkdown(( localize(11207, "- *None:* Create empty contents\n")));
|
|
1256
1266
|
}
|
|
1257
1267
|
}
|
|
1258
1268
|
append(contentsDescriptionElement, elementDisposables.add(renderMarkdown(markdown)).element);
|
|
@@ -1313,7 +1323,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1313
1323
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1314
1324
|
let profileElement;
|
|
1315
1325
|
const profileWorkspacesRowContainer = append(parent, $('.profile-row-container'));
|
|
1316
|
-
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1326
|
+
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(11208, "Folders & Workspaces"))));
|
|
1317
1327
|
const profileWorkspacesDescriptionElement = append(profileWorkspacesRowContainer, $('.profile-description-element'));
|
|
1318
1328
|
const workspacesTableContainer = append(profileWorkspacesRowContainer, $('.profile-associations-table'));
|
|
1319
1329
|
const table = this.workspacesTable = disposables.add(this.instantiationService.createInstance((WorkbenchTable), 'ProfileEditor-AssociationsTable', workspacesTableContainer, new class {
|
|
@@ -1332,14 +1342,14 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1332
1342
|
project(row) { return row; },
|
|
1333
1343
|
},
|
|
1334
1344
|
{
|
|
1335
|
-
label: ( localize(
|
|
1345
|
+
label: ( localize(11209, "Host")),
|
|
1336
1346
|
tooltip: '',
|
|
1337
1347
|
weight: 2,
|
|
1338
1348
|
templateId: WorkspaceUriHostColumnRenderer.TEMPLATE_ID,
|
|
1339
1349
|
project(row) { return row; },
|
|
1340
1350
|
},
|
|
1341
1351
|
{
|
|
1342
|
-
label: ( localize(
|
|
1352
|
+
label: ( localize(11210, "Path")),
|
|
1343
1353
|
tooltip: '',
|
|
1344
1354
|
weight: 7,
|
|
1345
1355
|
templateId: WorkspaceUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -1368,16 +1378,16 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1368
1378
|
getAriaLabel: (item) => {
|
|
1369
1379
|
const hostLabel = getHostLabel(this.labelService, item.workspace);
|
|
1370
1380
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
1371
|
-
return localize(
|
|
1381
|
+
return localize(11211, "{0}, trusted", this.labelService.getUriLabel(item.workspace));
|
|
1372
1382
|
}
|
|
1373
1383
|
return localize(
|
|
1374
|
-
|
|
1384
|
+
11212,
|
|
1375
1385
|
"{0} on {1}, trusted",
|
|
1376
1386
|
this.labelService.getUriLabel(item.workspace),
|
|
1377
1387
|
hostLabel
|
|
1378
1388
|
);
|
|
1379
1389
|
},
|
|
1380
|
-
getWidgetAriaLabel: () => ( localize(
|
|
1390
|
+
getWidgetAriaLabel: () => ( localize(11213, "Trusted Folders & Workspaces"))
|
|
1381
1391
|
},
|
|
1382
1392
|
identityProvider: {
|
|
1383
1393
|
getId(element) {
|
|
@@ -1394,15 +1404,15 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1394
1404
|
})));
|
|
1395
1405
|
const addButtonBarElement = append(profileWorkspacesRowContainer, $('.profile-workspaces-button-container'));
|
|
1396
1406
|
const buttonBar = disposables.add(( new ButtonBar(addButtonBarElement)));
|
|
1397
|
-
const addButton = this._register(buttonBar.addButton({ title: ( localize(
|
|
1398
|
-
addButton.label = ( localize(
|
|
1407
|
+
const addButton = this._register(buttonBar.addButton({ title: ( localize(11214, "Add Folder")), ...defaultButtonStyles }));
|
|
1408
|
+
addButton.label = ( localize(11214, "Add Folder"));
|
|
1399
1409
|
disposables.add(addButton.onDidClick(async () => {
|
|
1400
1410
|
const uris = await this.fileDialogService.showOpenDialog({
|
|
1401
1411
|
canSelectFiles: false,
|
|
1402
1412
|
canSelectFolders: true,
|
|
1403
1413
|
canSelectMany: true,
|
|
1404
|
-
openLabel: ( localize(
|
|
1405
|
-
title: ( localize(
|
|
1414
|
+
openLabel: ( localize(11215, "Add Folder")),
|
|
1415
|
+
title: ( localize(11216, "Select Folders To Add"))
|
|
1406
1416
|
});
|
|
1407
1417
|
if (uris) {
|
|
1408
1418
|
if (profileElement?.root instanceof UserDataProfileElement) {
|
|
@@ -1417,7 +1427,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1417
1427
|
}));
|
|
1418
1428
|
const updateTable = () => {
|
|
1419
1429
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.workspaces?.length) {
|
|
1420
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1430
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(11217, "Following folders and workspaces are using this profile"));
|
|
1421
1431
|
workspacesTableContainer.classList.remove('hide');
|
|
1422
1432
|
table.splice(0, table.length, ( profileElement.root.workspaces
|
|
1423
1433
|
.map(workspace => ({ workspace, profileElement: profileElement.root })))
|
|
@@ -1425,7 +1435,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1425
1435
|
this.layout();
|
|
1426
1436
|
}
|
|
1427
1437
|
else {
|
|
1428
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1438
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(11218, "No folders or workspaces are using this profile"));
|
|
1429
1439
|
workspacesTableContainer.classList.add('hide');
|
|
1430
1440
|
}
|
|
1431
1441
|
};
|
|
@@ -1499,13 +1509,13 @@ let ExistingProfileResourceTreeRenderer = class ExistingProfileResourceTreeRende
|
|
|
1499
1509
|
}
|
|
1500
1510
|
const updateRadioItems = () => {
|
|
1501
1511
|
templateData.radio.setItems([{
|
|
1502
|
-
text: ( localize(
|
|
1503
|
-
tooltip: ( localize(
|
|
1512
|
+
text: ( localize(11219, "Default")),
|
|
1513
|
+
tooltip: ( localize(11220, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1504
1514
|
isActive: root.getFlag(element.resourceType)
|
|
1505
1515
|
},
|
|
1506
1516
|
{
|
|
1507
1517
|
text: root.name,
|
|
1508
|
-
tooltip: ( localize(
|
|
1518
|
+
tooltip: ( localize(11221, "Use {0} from the {1} profile", resourceTypeTitle, root.name)),
|
|
1509
1519
|
isActive: !root.getFlag(element.resourceType)
|
|
1510
1520
|
}]);
|
|
1511
1521
|
};
|
|
@@ -1573,22 +1583,22 @@ let NewProfileResourceTreeRenderer = class NewProfileResourceTreeRenderer extend
|
|
|
1573
1583
|
templateData.label.textContent = resourceTypeTitle;
|
|
1574
1584
|
const renderRadioItems = () => {
|
|
1575
1585
|
const options = [{
|
|
1576
|
-
text: ( localize(
|
|
1577
|
-
tooltip: ( localize(
|
|
1586
|
+
text: ( localize(11219, "Default")),
|
|
1587
|
+
tooltip: ( localize(11220, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1578
1588
|
},
|
|
1579
1589
|
{
|
|
1580
|
-
text: ( localize(
|
|
1581
|
-
tooltip: ( localize(
|
|
1590
|
+
text: ( localize(11222, "None")),
|
|
1591
|
+
tooltip: ( localize(11223, "Create empty {0}", resourceTypeTitle))
|
|
1582
1592
|
}];
|
|
1583
1593
|
const copyFromName = root.getCopyFromName();
|
|
1584
1594
|
const name = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1585
|
-
? ( localize(
|
|
1595
|
+
? ( localize(11204, "{0} (Copy)", copyFromName))
|
|
1586
1596
|
: copyFromName;
|
|
1587
1597
|
if (root.copyFrom && name) {
|
|
1588
1598
|
templateData.radio.setItems([
|
|
1589
1599
|
{
|
|
1590
1600
|
text: name,
|
|
1591
|
-
tooltip: name ? ( localize(
|
|
1601
|
+
tooltip: name ? ( localize(11224, "Copy {0} from the {1} profile", resourceTypeTitle, name)) : ( localize(11225, "Copy")),
|
|
1592
1602
|
},
|
|
1593
1603
|
...options
|
|
1594
1604
|
]);
|
|
@@ -1806,7 +1816,7 @@ let ChangeProfileAction = class ChangeProfileAction extends Action {
|
|
|
1806
1816
|
super('changeProfile', '', ThemeIcon.asClassName(editIcon));
|
|
1807
1817
|
this.item = item;
|
|
1808
1818
|
this.userDataProfilesService = userDataProfilesService;
|
|
1809
|
-
this.tooltip = ( localize(
|
|
1819
|
+
this.tooltip = ( localize(11226, "Change Profile"));
|
|
1810
1820
|
}
|
|
1811
1821
|
getSwitchProfileActions() {
|
|
1812
1822
|
return ( this.userDataProfilesService.profiles
|
|
@@ -1878,7 +1888,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1878
1888
|
class: ThemeIcon.asClassName(Codicon.window),
|
|
1879
1889
|
enabled: !this.uriIdentityService.extUri.isEqual(item.workspace, item.profileElement.getCurrentWorkspace()),
|
|
1880
1890
|
id: 'openWorkspace',
|
|
1881
|
-
tooltip: ( localize(
|
|
1891
|
+
tooltip: ( localize(11227, "Open in New Window")),
|
|
1882
1892
|
run: () => item.profileElement.openWorkspace(item.workspace)
|
|
1883
1893
|
};
|
|
1884
1894
|
}
|
|
@@ -1888,7 +1898,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1888
1898
|
class: ThemeIcon.asClassName(removeIcon),
|
|
1889
1899
|
enabled: this.userDataProfileManagementService.getDefaultProfileToUse().id !== item.profileElement.profile.id,
|
|
1890
1900
|
id: 'deleteTrustedUri',
|
|
1891
|
-
tooltip: ( localize(
|
|
1901
|
+
tooltip: ( localize(11228, "Delete Path")),
|
|
1892
1902
|
run: () => item.profileElement.updateWorkspaces([], [item.workspace])
|
|
1893
1903
|
};
|
|
1894
1904
|
}
|
|
@@ -1903,7 +1913,7 @@ WorkspaceUriActionsColumnRenderer = WorkspaceUriActionsColumnRenderer_1 = ( __de
|
|
|
1903
1913
|
( __param(3, IUriIdentityService))
|
|
1904
1914
|
], WorkspaceUriActionsColumnRenderer));
|
|
1905
1915
|
function getHostLabel(labelService, workspaceUri) {
|
|
1906
|
-
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(
|
|
1916
|
+
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(11229, "Local"));
|
|
1907
1917
|
}
|
|
1908
1918
|
let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends EditorInput {
|
|
1909
1919
|
static { UserDataProfilesEditorInput_1 = this; }
|
|
@@ -1924,7 +1934,7 @@ let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends Edit
|
|
|
1924
1934
|
this._register(this.model.onDidChange(e => this.dirty = ( this.model.profiles.some(profile => profile instanceof NewProfileElement))));
|
|
1925
1935
|
}
|
|
1926
1936
|
get typeId() { return UserDataProfilesEditorInput_1.ID; }
|
|
1927
|
-
getName() { return localize(
|
|
1937
|
+
getName() { return localize(11230, "Profiles"); }
|
|
1928
1938
|
getIcon() { return defaultUserDataProfileIcon; }
|
|
1929
1939
|
async resolve() {
|
|
1930
1940
|
await this.model.resolve();
|