@codingame/monaco-vscode-user-data-profile-service-override 10.1.3 → 11.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 +3 -2
- package/vscode/src/vs/platform/userDataProfile/browser/userDataProfile.js +1 -8
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.js +84 -27
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfileActions.js +4 -7
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.js +101 -85
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +27 -27
- 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/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 +40 -41
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +8 -8
- package/vscode/src/vs/workbench/services/userDataSync/browser/userDataSyncInit.js +6 -6
- package/_virtual/semver.js +0 -5
- package/vscode/src/vs/platform/userDataSync/common/extensionsMerge.js +0 -331
- package/vscode/src/vs/platform/userDataSync/common/extensionsSync.js +0 -546
- package/vscode/src/vs/platform/userDataSync/common/globalStateMerge.js +0 -102
- package/vscode/src/vs/platform/userDataSync/common/globalStateSync.js +0 -431
- package/vscode/src/vs/platform/userDataSync/common/keybindingsMerge.js +0 -277
- package/vscode/src/vs/platform/userDataSync/common/keybindingsSync.js +0 -325
- package/vscode/src/vs/platform/userDataSync/common/settingsSync.js +0 -338
- package/vscode/src/vs/platform/userDataSync/common/snippetsMerge.js +0 -126
- package/vscode/src/vs/platform/userDataSync/common/snippetsSync.js +0 -478
- package/vscode/src/vs/platform/userDataSync/common/tasksSync.js +0 -245
|
@@ -14,7 +14,7 @@ import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProf
|
|
|
14
14
|
import { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
15
15
|
import { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
|
|
16
16
|
import { PROFILE_FILTER, defaultUserDataProfileIcon } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile';
|
|
17
|
-
import { IUserDataProfileService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
17
|
+
import { IUserDataProfileService, IUserDataProfileManagementService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
18
18
|
import { SplitView, Sizing } from 'vscode/vscode/vs/base/browser/ui/splitview/splitview';
|
|
19
19
|
import { ButtonWithDropdown, Button, ButtonBar } from 'vscode/vscode/vs/base/browser/ui/button/button';
|
|
20
20
|
import { getListStyles, defaultButtonStyles, getInputBoxStyle, defaultInputBoxStyles, defaultCheckboxStyles, defaultSelectBoxStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
|
|
@@ -68,8 +68,9 @@ import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistr
|
|
|
68
68
|
import { DropdownMenuActionViewItem } from 'vscode/vscode/vs/base/browser/ui/dropdown/dropdownActionViewItem';
|
|
69
69
|
|
|
70
70
|
var UserDataProfilesEditor_1, ExistingProfileResourceTreeRenderer_1, NewProfileResourceTreeRenderer_1, ProfileResourceChildTreeItemRenderer_1, WorkspaceUriHostColumnRenderer_1, WorkspaceUriPathColumnRenderer_1, WorkspaceUriActionsColumnRenderer_1, UserDataProfilesEditorInput_1;
|
|
71
|
-
const editIcon = registerIcon('profiles-editor-edit-folder', Codicon.edit, ( localize(
|
|
72
|
-
const
|
|
71
|
+
const editIcon = registerIcon('profiles-editor-edit-folder', Codicon.edit, ( localize(11178, 'Icon for the edit folder icon in the profiles editor.')));
|
|
72
|
+
const removeIcon = registerIcon('profiles-editor-remove-folder', Codicon.close, ( localize(11179, 'Icon for the remove folder icon in the profiles editor.')));
|
|
73
|
+
const profilesSashBorder = registerColor('profiles.sashBorder', PANEL_BORDER, ( localize(11180, "The color of the Profiles editor splitview sash border.")));
|
|
73
74
|
const listStyles = getListStyles({
|
|
74
75
|
listActiveSelectionBackground: editorBackground,
|
|
75
76
|
listActiveSelectionForeground: foreground,
|
|
@@ -165,7 +166,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
165
166
|
return profileElement?.name ?? '';
|
|
166
167
|
},
|
|
167
168
|
getWidgetAriaLabel() {
|
|
168
|
-
return ( localize(
|
|
169
|
+
return ( localize(11181, "Profiles"));
|
|
169
170
|
}
|
|
170
171
|
},
|
|
171
172
|
openOnSingleClick: true,
|
|
@@ -186,10 +187,10 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
186
187
|
getActions: () => {
|
|
187
188
|
const actions = [];
|
|
188
189
|
if (this.templates.length) {
|
|
189
|
-
actions.push(( (new SubmenuAction('from.template', ( localize(
|
|
190
|
+
actions.push(( (new SubmenuAction('from.template', ( localize(11182, "From Template")), this.getCreateFromTemplateActions()))));
|
|
190
191
|
actions.push(( (new Separator())));
|
|
191
192
|
}
|
|
192
|
-
actions.push(( (new Action('importProfile', ( localize(
|
|
193
|
+
actions.push(( (new Action('importProfile', ( localize(11183, "Import Profile...")), undefined, true, () => this.importProfile()))));
|
|
193
194
|
return actions;
|
|
194
195
|
}
|
|
195
196
|
},
|
|
@@ -198,7 +199,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
198
199
|
supportIcons: true,
|
|
199
200
|
...defaultButtonStyles
|
|
200
201
|
}))));
|
|
201
|
-
button.label = ( localize(
|
|
202
|
+
button.label = ( localize(11184, "New Profile"));
|
|
202
203
|
this._register(button.onDidClick(e => this.createNewProfile()));
|
|
203
204
|
}
|
|
204
205
|
getCreateFromTemplateActions() {
|
|
@@ -245,13 +246,13 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
245
246
|
}
|
|
246
247
|
getTreeContextMenuActions() {
|
|
247
248
|
const actions = [];
|
|
248
|
-
actions.push(( (new Action('newProfile', ( localize(
|
|
249
|
+
actions.push(( (new Action('newProfile', ( localize(11184, "New Profile")), undefined, true, () => this.createNewProfile()))));
|
|
249
250
|
const templateActions = this.getCreateFromTemplateActions();
|
|
250
251
|
if (templateActions.length) {
|
|
251
|
-
actions.push(( (new SubmenuAction('from.template', ( localize(
|
|
252
|
+
actions.push(( (new SubmenuAction('from.template', ( localize(11185, "New Profile From Template")), templateActions))));
|
|
252
253
|
}
|
|
253
254
|
actions.push(( (new Separator())));
|
|
254
|
-
actions.push(( (new Action('importProfile', ( localize(
|
|
255
|
+
actions.push(( (new Action('importProfile', ( localize(11183, "Import Profile...")), undefined, true, () => this.importProfile()))));
|
|
255
256
|
return actions;
|
|
256
257
|
}
|
|
257
258
|
async importProfile() {
|
|
@@ -260,13 +261,13 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
260
261
|
const updateQuickPickItems = (value) => {
|
|
261
262
|
const quickPickItems = [];
|
|
262
263
|
if (value) {
|
|
263
|
-
quickPickItems.push({ label: quickPick.value, description: ( localize(
|
|
264
|
+
quickPickItems.push({ label: quickPick.value, description: ( localize(11186, "Import from URL")) });
|
|
264
265
|
}
|
|
265
|
-
quickPickItems.push({ label: ( localize(
|
|
266
|
+
quickPickItems.push({ label: ( localize(11187, "Select File...")) });
|
|
266
267
|
quickPick.items = quickPickItems;
|
|
267
268
|
};
|
|
268
|
-
quickPick.title = ( localize(
|
|
269
|
-
quickPick.placeholder = ( localize(
|
|
269
|
+
quickPick.title = ( localize(11188, "Import from Profile Template..."));
|
|
270
|
+
quickPick.placeholder = ( localize(11189, "Provide Profile Template URL"));
|
|
270
271
|
quickPick.ignoreFocusOut = true;
|
|
271
272
|
disposables.add(quickPick.onDidChangeValue(updateQuickPickItems));
|
|
272
273
|
updateQuickPickItems();
|
|
@@ -301,7 +302,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
301
302
|
canSelectFiles: true,
|
|
302
303
|
canSelectMany: false,
|
|
303
304
|
filters: PROFILE_FILTER,
|
|
304
|
-
title: ( localize(
|
|
305
|
+
title: ( localize(11190, "Select Profile Template File")),
|
|
305
306
|
});
|
|
306
307
|
if (!profileLocation) {
|
|
307
308
|
return null;
|
|
@@ -378,7 +379,7 @@ let ProfileElementRenderer = class ProfileElementRenderer {
|
|
|
378
379
|
const label = append(container, $('.profile-list-item-label'));
|
|
379
380
|
const dirty = append(container, $(`span${ThemeIcon.asCSSSelector(Codicon.circleFilled)}`));
|
|
380
381
|
const description = append(container, $('.profile-list-item-description'));
|
|
381
|
-
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(
|
|
382
|
+
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(11191, "Active"))));
|
|
382
383
|
const actionsContainer = append(container, $('.profile-tree-item-actions-container'));
|
|
383
384
|
const actionBar = disposables.add(this.instantiationService.createInstance(WorkbenchToolBar, actionsContainer, {
|
|
384
385
|
hoverDelegate: disposables.add(createInstantHoverDelegate()),
|
|
@@ -635,8 +636,10 @@ class ProfileTreeDataSource {
|
|
|
635
636
|
children.push({ element: 'contents', root: element });
|
|
636
637
|
}
|
|
637
638
|
else if (element instanceof UserDataProfileElement) {
|
|
638
|
-
|
|
639
|
-
|
|
639
|
+
if (!element.profile.isDefault) {
|
|
640
|
+
children.push({ element: 'name', root: element });
|
|
641
|
+
children.push({ element: 'icon', root: element });
|
|
642
|
+
}
|
|
640
643
|
children.push({ element: 'useAsDefault', root: element });
|
|
641
644
|
children.push({ element: 'contents', root: element });
|
|
642
645
|
children.push({ element: 'workspaces', root: element });
|
|
@@ -720,15 +723,15 @@ class AbstractProfileResourceTreeRenderer extends Disposable {
|
|
|
720
723
|
getResourceTypeTitle(resourceType) {
|
|
721
724
|
switch (resourceType) {
|
|
722
725
|
case "settings" :
|
|
723
|
-
return ( localize(
|
|
726
|
+
return ( localize(11192, "Settings"));
|
|
724
727
|
case "keybindings" :
|
|
725
|
-
return ( localize(
|
|
728
|
+
return ( localize(11193, "Keyboard Shortcuts"));
|
|
726
729
|
case "snippets" :
|
|
727
|
-
return ( localize(
|
|
730
|
+
return ( localize(11194, "Snippets"));
|
|
728
731
|
case "tasks" :
|
|
729
|
-
return ( localize(
|
|
732
|
+
return ( localize(11195, "Tasks"));
|
|
730
733
|
case "extensions" :
|
|
731
|
-
return ( localize(
|
|
734
|
+
return ( localize(11196, "Extensions"));
|
|
732
735
|
}
|
|
733
736
|
return '';
|
|
734
737
|
}
|
|
@@ -757,18 +760,18 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
757
760
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
758
761
|
let profileElement;
|
|
759
762
|
const nameContainer = append(parent, $('.profile-row-container'));
|
|
760
|
-
append(nameContainer, $('.profile-label-element', undefined, ( localize(
|
|
763
|
+
append(nameContainer, $('.profile-label-element', undefined, ( localize(11197, "Name"))));
|
|
761
764
|
const nameInput = disposables.add(( (new InputBox(nameContainer, this.contextViewService, {
|
|
762
765
|
inputBoxStyles: getInputBoxStyle({
|
|
763
766
|
inputBorder: settingsTextInputBorder
|
|
764
767
|
}),
|
|
765
|
-
ariaLabel: ( localize(
|
|
766
|
-
placeholder: ( localize(
|
|
768
|
+
ariaLabel: ( localize(11198, "Profile Name")),
|
|
769
|
+
placeholder: ( localize(11198, "Profile Name")),
|
|
767
770
|
validationOptions: {
|
|
768
771
|
validation: (value) => {
|
|
769
772
|
if (!value) {
|
|
770
773
|
return {
|
|
771
|
-
content: ( localize(
|
|
774
|
+
content: ( localize(11199, "Profile name is required and must be a non-empty value.")),
|
|
772
775
|
type: 2
|
|
773
776
|
};
|
|
774
777
|
}
|
|
@@ -782,7 +785,7 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
782
785
|
value = value.trim();
|
|
783
786
|
if (initialName !== value && ( (this.userDataProfilesService.profiles.some(p => !p.isTransient && p.name === value)))) {
|
|
784
787
|
return {
|
|
785
|
-
content: ( localize(
|
|
788
|
+
content: ( localize(11200, "Profile with name {0} already exists.", value)),
|
|
786
789
|
type: 2
|
|
787
790
|
};
|
|
788
791
|
}
|
|
@@ -812,10 +815,10 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
812
815
|
nameInput.enable();
|
|
813
816
|
}
|
|
814
817
|
if (isDefaultProfile) {
|
|
815
|
-
nameInput.setTooltip(( localize(
|
|
818
|
+
nameInput.setTooltip(( localize(11201, "Name cannot be changed for the default profile")));
|
|
816
819
|
}
|
|
817
820
|
else {
|
|
818
|
-
nameInput.setTooltip(( localize(
|
|
821
|
+
nameInput.setTooltip(( localize(11198, "Profile Name")));
|
|
819
822
|
}
|
|
820
823
|
};
|
|
821
824
|
return {
|
|
@@ -853,9 +856,9 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
853
856
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
854
857
|
let profileElement;
|
|
855
858
|
const iconContainer = append(parent, $('.profile-row-container'));
|
|
856
|
-
append(iconContainer, $('.profile-label-element', undefined, ( localize(
|
|
859
|
+
append(iconContainer, $('.profile-label-element', undefined, ( localize(11202, "Icon"))));
|
|
857
860
|
const iconValueContainer = append(iconContainer, $('.profile-icon-container'));
|
|
858
|
-
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(
|
|
861
|
+
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(11203, "Profile Icon")) }));
|
|
859
862
|
const iconHover = disposables.add(this.hoverService.setupManagedHover(this.hoverDelegate, iconElement, ''));
|
|
860
863
|
const iconSelectBox = disposables.add(this.instantiationService.createInstance(WorkbenchIconSelectBox, { icons: ICONS, inputBoxStyles: defaultInputBoxStyles }));
|
|
861
864
|
let hoverWidget;
|
|
@@ -884,7 +887,7 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
884
887
|
},
|
|
885
888
|
}, true);
|
|
886
889
|
if (hoverWidget) {
|
|
887
|
-
iconSelectBox.layout(( (new Dimension(486,
|
|
890
|
+
iconSelectBox.layout(( (new Dimension(486, 292))));
|
|
888
891
|
iconSelectBox.focus();
|
|
889
892
|
}
|
|
890
893
|
};
|
|
@@ -914,14 +917,14 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
914
917
|
profileElement.root.icon = selectedIcon.id;
|
|
915
918
|
}
|
|
916
919
|
}));
|
|
917
|
-
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(
|
|
920
|
+
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(11204, "Profile icon to be shown in the activity bar"))));
|
|
918
921
|
const renderIcon = (profileElement) => {
|
|
919
922
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.profile.isDefault) {
|
|
920
923
|
iconValueContainer.classList.add('disabled');
|
|
921
|
-
iconHover.update(( localize(
|
|
924
|
+
iconHover.update(( localize(11205, "Icon cannot be changed for the default profile")));
|
|
922
925
|
}
|
|
923
926
|
else {
|
|
924
|
-
iconHover.update(( localize(
|
|
927
|
+
iconHover.update(( localize(11206, "Click to change icon")));
|
|
925
928
|
iconValueContainer.classList.remove('disabled');
|
|
926
929
|
}
|
|
927
930
|
if (profileElement.root.icon) {
|
|
@@ -961,9 +964,9 @@ let UseForCurrentWindowPropertyRenderer = class UseForCurrentWindowPropertyRende
|
|
|
961
964
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
962
965
|
let profileElement;
|
|
963
966
|
const useForCurrentWindowContainer = append(parent, $('.profile-row-container'));
|
|
964
|
-
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(
|
|
967
|
+
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(11207, "Use for Current Window"))));
|
|
965
968
|
const useForCurrentWindowValueContainer = append(useForCurrentWindowContainer, $('.profile-use-for-current-container'));
|
|
966
|
-
const useForCurrentWindowTitle = ( localize(
|
|
969
|
+
const useForCurrentWindowTitle = ( localize(11208, "Use this profile for the current window"));
|
|
967
970
|
const useForCurrentWindowCheckbox = disposables.add(( (new Checkbox(useForCurrentWindowTitle, false, defaultCheckboxStyles))));
|
|
968
971
|
append(useForCurrentWindowValueContainer, useForCurrentWindowCheckbox.domNode);
|
|
969
972
|
const useForCurrentWindowLabel = append(useForCurrentWindowValueContainer, $('.profile-description-element', undefined, useForCurrentWindowTitle));
|
|
@@ -1013,9 +1016,9 @@ class UseAsDefaultProfileRenderer extends ProfilePropertyRenderer {
|
|
|
1013
1016
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
1014
1017
|
let profileElement;
|
|
1015
1018
|
const useAsDefaultProfileContainer = append(parent, $('.profile-row-container'));
|
|
1016
|
-
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(
|
|
1019
|
+
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(11209, "Use for New Windows"))));
|
|
1017
1020
|
const useAsDefaultProfileValueContainer = append(useAsDefaultProfileContainer, $('.profile-use-as-default-container'));
|
|
1018
|
-
const useAsDefaultProfileTitle = ( localize(
|
|
1021
|
+
const useAsDefaultProfileTitle = ( localize(11210, "Use this profile as the default for new windows"));
|
|
1019
1022
|
const useAsDefaultProfileCheckbox = disposables.add(( (new Checkbox(useAsDefaultProfileTitle, false, defaultCheckboxStyles))));
|
|
1020
1023
|
append(useAsDefaultProfileValueContainer, useAsDefaultProfileCheckbox.domNode);
|
|
1021
1024
|
const useAsDefaultProfileLabel = append(useAsDefaultProfileValueContainer, $('.profile-description-element', undefined, useAsDefaultProfileTitle));
|
|
@@ -1062,11 +1065,11 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1062
1065
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
1063
1066
|
let profileElement;
|
|
1064
1067
|
const copyFromContainer = append(parent, $('.profile-row-container.profile-copy-from-container'));
|
|
1065
|
-
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(
|
|
1066
|
-
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(
|
|
1068
|
+
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(11211, "Copy from"))));
|
|
1069
|
+
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(11212, "Select the profile source from which you want to copy contents"))));
|
|
1067
1070
|
const copyFromSelectBox = disposables.add(this.instantiationService.createInstance(SelectBox, [], 0, this.contextViewService, defaultSelectBoxStyles, {
|
|
1068
1071
|
useCustomDrawn: true,
|
|
1069
|
-
ariaLabel: ( localize(
|
|
1072
|
+
ariaLabel: ( localize(11213, "Copy profile from")),
|
|
1070
1073
|
}));
|
|
1071
1074
|
copyFromSelectBox.render(append(copyFromContainer, $('.profile-select-container')));
|
|
1072
1075
|
const render = (profileElement, copyFromOptions) => {
|
|
@@ -1110,7 +1113,7 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1110
1113
|
getCopyFromOptions(profileElement) {
|
|
1111
1114
|
const separator = { text: '\u2500\u2500\u2500\u2500\u2500\u2500', isDisabled: true };
|
|
1112
1115
|
const copyFromOptions = [];
|
|
1113
|
-
copyFromOptions.push({ text: ( localize(
|
|
1116
|
+
copyFromOptions.push({ text: ( localize(11214, "None")) });
|
|
1114
1117
|
for (const [copyFromTemplate, name] of profileElement.copyFromTemplates) {
|
|
1115
1118
|
if (!( (this.templates.some(
|
|
1116
1119
|
template => this.uriIdentityService.extUri.isEqual(( (URI.parse(template.url))), copyFromTemplate)
|
|
@@ -1119,12 +1122,12 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1119
1122
|
}
|
|
1120
1123
|
}
|
|
1121
1124
|
if (this.templates.length) {
|
|
1122
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1125
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(11215, "Profile Templates")) });
|
|
1123
1126
|
for (const template of this.templates) {
|
|
1124
1127
|
copyFromOptions.push({ text: template.name, id: template.url, source: ( (URI.parse(template.url))) });
|
|
1125
1128
|
}
|
|
1126
1129
|
}
|
|
1127
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1130
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(11216, "Existing Profiles")) });
|
|
1128
1131
|
for (const profile of this.userDataProfilesService.profiles) {
|
|
1129
1132
|
if (!profile.isTransient) {
|
|
1130
1133
|
copyFromOptions.push({ text: profile.name, id: profile.id, source: profile });
|
|
@@ -1156,11 +1159,11 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1156
1159
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
1157
1160
|
let profileElement;
|
|
1158
1161
|
const configureRowContainer = append(parent, $('.profile-row-container'));
|
|
1159
|
-
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1162
|
+
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(11217, "Contents"))));
|
|
1160
1163
|
const contentsDescriptionElement = append(configureRowContainer, $('.profile-description-element'));
|
|
1161
1164
|
const contentsTreeHeader = append(configureRowContainer, $('.profile-content-tree-header'));
|
|
1162
|
-
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(
|
|
1163
|
-
append(contentsTreeHeader, $(''), $('', undefined, ( localize(
|
|
1165
|
+
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(11218, "Source"))));
|
|
1166
|
+
append(contentsTreeHeader, $(''), $('', undefined, ( localize(11217, "Contents"))), optionsLabel, $(''));
|
|
1164
1167
|
const delegate = ( (new ProfileContentTreeElementDelegate()));
|
|
1165
1168
|
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
1169
|
this.instantiationService.createInstance(ExistingProfileResourceTreeRenderer),
|
|
@@ -1232,27 +1235,27 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1232
1235
|
clearNode(contentsDescriptionElement);
|
|
1233
1236
|
const markdown = ( (new MarkdownString()));
|
|
1234
1237
|
if (element.root instanceof UserDataProfileElement && element.root.profile.isDefault) {
|
|
1235
|
-
markdown.appendMarkdown(( localize(
|
|
1238
|
+
markdown.appendMarkdown(( localize(11219, "Browse contents of this profile\n")));
|
|
1236
1239
|
}
|
|
1237
1240
|
else {
|
|
1238
|
-
markdown.appendMarkdown(( localize(
|
|
1241
|
+
markdown.appendMarkdown(( localize(11220, "Configure source of contents for this profile\n")));
|
|
1239
1242
|
if (element.root instanceof NewProfileElement) {
|
|
1240
1243
|
const copyFromName = element.root.getCopyFromName();
|
|
1241
1244
|
const optionName = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1242
|
-
? ( localize(
|
|
1245
|
+
? ( localize(11221, "{0} (Copy)", copyFromName))
|
|
1243
1246
|
: copyFromName;
|
|
1244
1247
|
if (optionName) {
|
|
1245
1248
|
markdown
|
|
1246
1249
|
.appendMarkdown(( localize(
|
|
1247
|
-
|
|
1250
|
+
11222,
|
|
1248
1251
|
"- *{0}:* Copy contents from the {1} profile\n",
|
|
1249
1252
|
optionName,
|
|
1250
1253
|
copyFromName
|
|
1251
1254
|
)));
|
|
1252
1255
|
}
|
|
1253
1256
|
markdown
|
|
1254
|
-
.appendMarkdown(( localize(
|
|
1255
|
-
.appendMarkdown(( localize(
|
|
1257
|
+
.appendMarkdown(( localize(11223, "- *Default:* Use contents from the Default profile\n")))
|
|
1258
|
+
.appendMarkdown(( localize(11224, "- *None:* Create empty contents\n")));
|
|
1256
1259
|
}
|
|
1257
1260
|
}
|
|
1258
1261
|
append(contentsDescriptionElement, elementDisposables.add(renderMarkdown(markdown)).element);
|
|
@@ -1313,7 +1316,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1313
1316
|
const elementDisposables = disposables.add(( (new DisposableStore())));
|
|
1314
1317
|
let profileElement;
|
|
1315
1318
|
const profileWorkspacesRowContainer = append(parent, $('.profile-row-container'));
|
|
1316
|
-
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1319
|
+
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(11225, "Folders & Workspaces"))));
|
|
1317
1320
|
const profileWorkspacesDescriptionElement = append(profileWorkspacesRowContainer, $('.profile-description-element'));
|
|
1318
1321
|
const workspacesTableContainer = append(profileWorkspacesRowContainer, $('.profile-associations-table'));
|
|
1319
1322
|
const table = this.workspacesTable = disposables.add(this.instantiationService.createInstance((WorkbenchTable), 'ProfileEditor-AssociationsTable', workspacesTableContainer, new class {
|
|
@@ -1332,14 +1335,14 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1332
1335
|
project(row) { return row; },
|
|
1333
1336
|
},
|
|
1334
1337
|
{
|
|
1335
|
-
label: ( localize(
|
|
1338
|
+
label: ( localize(11226, "Host")),
|
|
1336
1339
|
tooltip: '',
|
|
1337
1340
|
weight: 2,
|
|
1338
1341
|
templateId: WorkspaceUriHostColumnRenderer.TEMPLATE_ID,
|
|
1339
1342
|
project(row) { return row; },
|
|
1340
1343
|
},
|
|
1341
1344
|
{
|
|
1342
|
-
label: ( localize(
|
|
1345
|
+
label: ( localize(11227, "Path")),
|
|
1343
1346
|
tooltip: '',
|
|
1344
1347
|
weight: 7,
|
|
1345
1348
|
templateId: WorkspaceUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -1349,8 +1352,8 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1349
1352
|
label: '',
|
|
1350
1353
|
tooltip: '',
|
|
1351
1354
|
weight: 1,
|
|
1352
|
-
minimumWidth:
|
|
1353
|
-
maximumWidth:
|
|
1355
|
+
minimumWidth: 84,
|
|
1356
|
+
maximumWidth: 84,
|
|
1354
1357
|
templateId: WorkspaceUriActionsColumnRenderer.TEMPLATE_ID,
|
|
1355
1358
|
project(row) { return row; }
|
|
1356
1359
|
},
|
|
@@ -1368,16 +1371,16 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1368
1371
|
getAriaLabel: (item) => {
|
|
1369
1372
|
const hostLabel = getHostLabel(this.labelService, item.workspace);
|
|
1370
1373
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
1371
|
-
return ( localize(
|
|
1374
|
+
return ( localize(11228, "{0}, trusted", this.labelService.getUriLabel(item.workspace)));
|
|
1372
1375
|
}
|
|
1373
1376
|
return ( localize(
|
|
1374
|
-
|
|
1377
|
+
11229,
|
|
1375
1378
|
"{0} on {1}, trusted",
|
|
1376
1379
|
this.labelService.getUriLabel(item.workspace),
|
|
1377
1380
|
hostLabel
|
|
1378
1381
|
));
|
|
1379
1382
|
},
|
|
1380
|
-
getWidgetAriaLabel: () => ( localize(
|
|
1383
|
+
getWidgetAriaLabel: () => ( localize(11230, "Trusted Folders & Workspaces"))
|
|
1381
1384
|
},
|
|
1382
1385
|
identityProvider: {
|
|
1383
1386
|
getId(element) {
|
|
@@ -1396,15 +1399,15 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1396
1399
|
})));
|
|
1397
1400
|
const addButtonBarElement = append(profileWorkspacesRowContainer, $('.profile-workspaces-button-container'));
|
|
1398
1401
|
const buttonBar = disposables.add(( (new ButtonBar(addButtonBarElement))));
|
|
1399
|
-
const addButton = this._register(buttonBar.addButton({ title: ( localize(
|
|
1400
|
-
addButton.label = ( localize(
|
|
1402
|
+
const addButton = this._register(buttonBar.addButton({ title: ( localize(11231, "Add Folder")), ...defaultButtonStyles }));
|
|
1403
|
+
addButton.label = ( localize(11231, "Add Folder"));
|
|
1401
1404
|
disposables.add(addButton.onDidClick(async () => {
|
|
1402
1405
|
const uris = await this.fileDialogService.showOpenDialog({
|
|
1403
1406
|
canSelectFiles: false,
|
|
1404
1407
|
canSelectFolders: true,
|
|
1405
1408
|
canSelectMany: true,
|
|
1406
|
-
openLabel: ( localize(
|
|
1407
|
-
title: ( localize(
|
|
1409
|
+
openLabel: ( localize(11232, "Add Folder")),
|
|
1410
|
+
title: ( localize(11233, "Select Folders To Add"))
|
|
1408
1411
|
});
|
|
1409
1412
|
if (uris) {
|
|
1410
1413
|
if (profileElement?.root instanceof UserDataProfileElement) {
|
|
@@ -1419,7 +1422,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1419
1422
|
}));
|
|
1420
1423
|
const updateTable = () => {
|
|
1421
1424
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.workspaces?.length) {
|
|
1422
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1425
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(11234, "Following folders and workspaces are using this profile"));
|
|
1423
1426
|
workspacesTableContainer.classList.remove('hide');
|
|
1424
1427
|
table.splice(0, table.length, ( (profileElement.root.workspaces
|
|
1425
1428
|
.map(workspace => ({ workspace, profileElement: profileElement.root }))))
|
|
@@ -1427,7 +1430,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1427
1430
|
this.layout();
|
|
1428
1431
|
}
|
|
1429
1432
|
else {
|
|
1430
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1433
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(11235, "No folders or workspaces are using this profile"));
|
|
1431
1434
|
workspacesTableContainer.classList.add('hide');
|
|
1432
1435
|
}
|
|
1433
1436
|
};
|
|
@@ -1501,13 +1504,13 @@ let ExistingProfileResourceTreeRenderer = class ExistingProfileResourceTreeRende
|
|
|
1501
1504
|
}
|
|
1502
1505
|
const updateRadioItems = () => {
|
|
1503
1506
|
templateData.radio.setItems([{
|
|
1504
|
-
text: ( localize(
|
|
1505
|
-
tooltip: ( localize(
|
|
1507
|
+
text: ( localize(11236, "Default")),
|
|
1508
|
+
tooltip: ( localize(11237, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1506
1509
|
isActive: root.getFlag(element.resourceType)
|
|
1507
1510
|
},
|
|
1508
1511
|
{
|
|
1509
1512
|
text: root.name,
|
|
1510
|
-
tooltip: ( localize(
|
|
1513
|
+
tooltip: ( localize(11238, "Use {0} from the {1} profile", resourceTypeTitle, root.name)),
|
|
1511
1514
|
isActive: !root.getFlag(element.resourceType)
|
|
1512
1515
|
}]);
|
|
1513
1516
|
};
|
|
@@ -1575,22 +1578,22 @@ let NewProfileResourceTreeRenderer = class NewProfileResourceTreeRenderer extend
|
|
|
1575
1578
|
templateData.label.textContent = resourceTypeTitle;
|
|
1576
1579
|
const renderRadioItems = () => {
|
|
1577
1580
|
const options = [{
|
|
1578
|
-
text: ( localize(
|
|
1579
|
-
tooltip: ( localize(
|
|
1581
|
+
text: ( localize(11236, "Default")),
|
|
1582
|
+
tooltip: ( localize(11237, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1580
1583
|
},
|
|
1581
1584
|
{
|
|
1582
|
-
text: ( localize(
|
|
1583
|
-
tooltip: ( localize(
|
|
1585
|
+
text: ( localize(11239, "None")),
|
|
1586
|
+
tooltip: ( localize(11240, "Create empty {0}", resourceTypeTitle))
|
|
1584
1587
|
}];
|
|
1585
1588
|
const copyFromName = root.getCopyFromName();
|
|
1586
1589
|
const name = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1587
|
-
? ( localize(
|
|
1590
|
+
? ( localize(11221, "{0} (Copy)", copyFromName))
|
|
1588
1591
|
: copyFromName;
|
|
1589
1592
|
if (root.copyFrom && name) {
|
|
1590
1593
|
templateData.radio.setItems([
|
|
1591
1594
|
{
|
|
1592
1595
|
text: name,
|
|
1593
|
-
tooltip: name ? ( localize(
|
|
1596
|
+
tooltip: name ? ( localize(11241, "Copy {0} from the {1} profile", resourceTypeTitle, name)) : ( localize(11242, "Copy")),
|
|
1594
1597
|
},
|
|
1595
1598
|
...options
|
|
1596
1599
|
]);
|
|
@@ -1808,7 +1811,7 @@ let ChangeProfileAction = class ChangeProfileAction extends Action {
|
|
|
1808
1811
|
super('changeProfile', '', ThemeIcon.asClassName(editIcon));
|
|
1809
1812
|
this.item = item;
|
|
1810
1813
|
this.userDataProfilesService = userDataProfilesService;
|
|
1811
|
-
this.tooltip = ( localize(
|
|
1814
|
+
this.tooltip = ( localize(11243, "Change Profile"));
|
|
1812
1815
|
}
|
|
1813
1816
|
getSwitchProfileActions() {
|
|
1814
1817
|
return (
|
|
@@ -1838,8 +1841,9 @@ ChangeProfileAction = ( (__decorate([
|
|
|
1838
1841
|
let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer {
|
|
1839
1842
|
static { WorkspaceUriActionsColumnRenderer_1 = this; }
|
|
1840
1843
|
static { this.TEMPLATE_ID = 'actions'; }
|
|
1841
|
-
constructor(userDataProfilesService, contextMenuService, uriIdentityService) {
|
|
1844
|
+
constructor(userDataProfilesService, userDataProfileManagementService, contextMenuService, uriIdentityService) {
|
|
1842
1845
|
this.userDataProfilesService = userDataProfilesService;
|
|
1846
|
+
this.userDataProfileManagementService = userDataProfileManagementService;
|
|
1843
1847
|
this.contextMenuService = contextMenuService;
|
|
1844
1848
|
this.uriIdentityService = uriIdentityService;
|
|
1845
1849
|
this.templateId = WorkspaceUriActionsColumnRenderer_1.TEMPLATE_ID;
|
|
@@ -1874,6 +1878,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1874
1878
|
const actions = [];
|
|
1875
1879
|
actions.push(this.createOpenAction(item));
|
|
1876
1880
|
actions.push(( (new ChangeProfileAction(item, this.userDataProfilesService))));
|
|
1881
|
+
actions.push(this.createDeleteAction(item));
|
|
1877
1882
|
templateData.actionBar.push(actions, { icon: true });
|
|
1878
1883
|
}
|
|
1879
1884
|
createOpenAction(item) {
|
|
@@ -1882,21 +1887,32 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1882
1887
|
class: ThemeIcon.asClassName(Codicon.window),
|
|
1883
1888
|
enabled: !this.uriIdentityService.extUri.isEqual(item.workspace, item.profileElement.getCurrentWorkspace()),
|
|
1884
1889
|
id: 'openWorkspace',
|
|
1885
|
-
tooltip: ( localize(
|
|
1890
|
+
tooltip: ( localize(11244, "Open in New Window")),
|
|
1886
1891
|
run: () => item.profileElement.openWorkspace(item.workspace)
|
|
1887
1892
|
};
|
|
1888
1893
|
}
|
|
1894
|
+
createDeleteAction(item) {
|
|
1895
|
+
return {
|
|
1896
|
+
label: '',
|
|
1897
|
+
class: ThemeIcon.asClassName(removeIcon),
|
|
1898
|
+
enabled: this.userDataProfileManagementService.getDefaultProfileToUse().id !== item.profileElement.profile.id,
|
|
1899
|
+
id: 'deleteTrustedUri',
|
|
1900
|
+
tooltip: ( localize(11245, "Delete Path")),
|
|
1901
|
+
run: () => item.profileElement.updateWorkspaces([], [item.workspace])
|
|
1902
|
+
};
|
|
1903
|
+
}
|
|
1889
1904
|
disposeTemplate(templateData) {
|
|
1890
1905
|
templateData.disposables.dispose();
|
|
1891
1906
|
}
|
|
1892
1907
|
};
|
|
1893
1908
|
WorkspaceUriActionsColumnRenderer = WorkspaceUriActionsColumnRenderer_1 = ( (__decorate([
|
|
1894
1909
|
( (__param(0, IUserDataProfilesService))),
|
|
1895
|
-
( (__param(1,
|
|
1896
|
-
( (__param(2,
|
|
1910
|
+
( (__param(1, IUserDataProfileManagementService))),
|
|
1911
|
+
( (__param(2, IContextMenuService))),
|
|
1912
|
+
( (__param(3, IUriIdentityService)))
|
|
1897
1913
|
], WorkspaceUriActionsColumnRenderer)));
|
|
1898
1914
|
function getHostLabel(labelService, workspaceUri) {
|
|
1899
|
-
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(
|
|
1915
|
+
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(11246, "Local"));
|
|
1900
1916
|
}
|
|
1901
1917
|
let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends EditorInput {
|
|
1902
1918
|
static { UserDataProfilesEditorInput_1 = this; }
|
|
@@ -1917,7 +1933,7 @@ let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends Edit
|
|
|
1917
1933
|
this._register(this.model.onDidChange(e => this.dirty = ( (this.model.profiles.some(profile => profile instanceof NewProfileElement)))));
|
|
1918
1934
|
}
|
|
1919
1935
|
get typeId() { return UserDataProfilesEditorInput_1.ID; }
|
|
1920
|
-
getName() { return ( localize(
|
|
1936
|
+
getName() { return ( localize(11247, "Profiles")); }
|
|
1921
1937
|
getIcon() { return defaultUserDataProfileIcon; }
|
|
1922
1938
|
async resolve() {
|
|
1923
1939
|
await this.model.resolve();
|