@codingame/monaco-vscode-user-data-profile-service-override 18.4.0 → 19.0.1
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 +14 -15
- 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 +81 -79
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js +47 -31
- package/vscode/src/vs/workbench/services/userDataProfile/browser/extensionsResource.js +5 -5
- package/vscode/src/vs/workbench/services/userDataProfile/browser/globalStateResource.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/keybindingsResource.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/mcpProfileResource.d.ts +45 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/mcpProfileResource.js +117 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/settingsResource.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/snippetsResource.js +3 -3
- package/vscode/src/vs/workbench/services/userDataProfile/browser/tasksResource.js +2 -2
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.js +42 -41
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileInit.js +4 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +8 -8
|
@@ -51,7 +51,7 @@ import { IEditorProgressService } from '@codingame/monaco-vscode-api/vscode/vs/p
|
|
|
51
51
|
import { isUndefined, isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
52
52
|
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
53
53
|
import { RenderIndentGuides } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/abstractTree';
|
|
54
|
-
import { ResourceLabels, DEFAULT_LABELS_CONTAINER } from '@codingame/monaco-vscode-
|
|
54
|
+
import { ResourceLabels, DEFAULT_LABELS_CONTAINER } from '@codingame/monaco-vscode-2726569c-a06b-5f25-b851-14311bef12fa-common/vscode/vs/workbench/browser/labels';
|
|
55
55
|
import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
56
56
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
57
57
|
import { UserDataProfileElement, AbstractUserDataProfileElement, NewProfileElement, isProfileResourceTypeElement, isProfileResourceChildElement, UserDataProfilesEditorModel } from './userDataProfilesEditorModel.js';
|
|
@@ -75,9 +75,9 @@ import { Orientation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser
|
|
|
75
75
|
|
|
76
76
|
var UserDataProfilesEditor_1, ExistingProfileResourceTreeRenderer_1, NewProfileResourceTreeRenderer_1, ProfileResourceChildTreeItemRenderer_1, WorkspaceUriHostColumnRenderer_1, WorkspaceUriPathColumnRenderer_1, WorkspaceUriActionsColumnRenderer_1, UserDataProfilesEditorInput_1;
|
|
77
77
|
registerCss(userDataProfilesEditor);
|
|
78
|
-
const editIcon = registerIcon('profiles-editor-edit-folder', Codicon.edit, ( localize(
|
|
79
|
-
const removeIcon = registerIcon('profiles-editor-remove-folder', Codicon.close, ( localize(
|
|
80
|
-
const profilesSashBorder = registerColor('profiles.sashBorder', PANEL_BORDER, ( localize(
|
|
78
|
+
const editIcon = registerIcon('profiles-editor-edit-folder', Codicon.edit, ( localize(11822, 'Icon for the edit folder icon in the profiles editor.')));
|
|
79
|
+
const removeIcon = registerIcon('profiles-editor-remove-folder', Codicon.close, ( localize(11823, 'Icon for the remove folder icon in the profiles editor.')));
|
|
80
|
+
const profilesSashBorder = registerColor('profiles.sashBorder', PANEL_BORDER, ( localize(11824, "The color of the Profiles editor splitview sash border.")));
|
|
81
81
|
const listStyles = getListStyles({
|
|
82
82
|
listActiveSelectionBackground: editorBackground,
|
|
83
83
|
listActiveSelectionForeground: foreground,
|
|
@@ -173,7 +173,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
173
173
|
return profileElement?.name ?? '';
|
|
174
174
|
},
|
|
175
175
|
getWidgetAriaLabel() {
|
|
176
|
-
return localize(
|
|
176
|
+
return localize(11825, "Profiles");
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
openOnSingleClick: true,
|
|
@@ -194,12 +194,12 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
194
194
|
getActions: () => {
|
|
195
195
|
const actions = [];
|
|
196
196
|
if (this.templates.length) {
|
|
197
|
-
actions.push(( new SubmenuAction('from.template', ( localize(
|
|
197
|
+
actions.push(( new SubmenuAction('from.template', ( localize(11826, "From Template")), this.getCreateFromTemplateActions())));
|
|
198
198
|
actions.push(( new Separator()));
|
|
199
199
|
}
|
|
200
200
|
actions.push(toAction({
|
|
201
201
|
id: 'importProfile',
|
|
202
|
-
label: ( localize(
|
|
202
|
+
label: ( localize(11827, "Import Profile...")),
|
|
203
203
|
run: () => this.importProfile()
|
|
204
204
|
}));
|
|
205
205
|
return actions;
|
|
@@ -210,7 +210,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
210
210
|
supportIcons: true,
|
|
211
211
|
...defaultButtonStyles
|
|
212
212
|
})));
|
|
213
|
-
button.label = ( localize(
|
|
213
|
+
button.label = ( localize(11828, "New Profile"));
|
|
214
214
|
this._register(button.onDidClick(e => this.createNewProfile()));
|
|
215
215
|
}
|
|
216
216
|
getCreateFromTemplateActions() {
|
|
@@ -255,17 +255,17 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
255
255
|
const actions = [];
|
|
256
256
|
actions.push(toAction({
|
|
257
257
|
id: 'newProfile',
|
|
258
|
-
label: ( localize(
|
|
258
|
+
label: ( localize(11828, "New Profile")),
|
|
259
259
|
run: () => this.createNewProfile()
|
|
260
260
|
}));
|
|
261
261
|
const templateActions = this.getCreateFromTemplateActions();
|
|
262
262
|
if (templateActions.length) {
|
|
263
|
-
actions.push(( new SubmenuAction('from.template', ( localize(
|
|
263
|
+
actions.push(( new SubmenuAction('from.template', ( localize(11829, "New Profile From Template")), templateActions)));
|
|
264
264
|
}
|
|
265
265
|
actions.push(( new Separator()));
|
|
266
266
|
actions.push(toAction({
|
|
267
267
|
id: 'importProfile',
|
|
268
|
-
label: ( localize(
|
|
268
|
+
label: ( localize(11827, "Import Profile...")),
|
|
269
269
|
run: () => this.importProfile()
|
|
270
270
|
}));
|
|
271
271
|
return actions;
|
|
@@ -276,13 +276,13 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
276
276
|
const updateQuickPickItems = (value) => {
|
|
277
277
|
const quickPickItems = [];
|
|
278
278
|
if (value) {
|
|
279
|
-
quickPickItems.push({ label: quickPick.value, description: ( localize(
|
|
279
|
+
quickPickItems.push({ label: quickPick.value, description: ( localize(11830, "Import from URL")) });
|
|
280
280
|
}
|
|
281
|
-
quickPickItems.push({ label: ( localize(
|
|
281
|
+
quickPickItems.push({ label: ( localize(11831, "Select File...")) });
|
|
282
282
|
quickPick.items = quickPickItems;
|
|
283
283
|
};
|
|
284
|
-
quickPick.title = ( localize(
|
|
285
|
-
quickPick.placeholder = ( localize(
|
|
284
|
+
quickPick.title = ( localize(11832, "Import from Profile Template..."));
|
|
285
|
+
quickPick.placeholder = ( localize(11833, "Provide Profile Template URL"));
|
|
286
286
|
quickPick.ignoreFocusOut = true;
|
|
287
287
|
disposables.add(quickPick.onDidChangeValue(updateQuickPickItems));
|
|
288
288
|
updateQuickPickItems();
|
|
@@ -317,7 +317,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
317
317
|
canSelectFiles: true,
|
|
318
318
|
canSelectMany: false,
|
|
319
319
|
filters: PROFILE_FILTER,
|
|
320
|
-
title: ( localize(
|
|
320
|
+
title: ( localize(11834, "Select Profile Template File")),
|
|
321
321
|
});
|
|
322
322
|
if (!profileLocation) {
|
|
323
323
|
return null;
|
|
@@ -394,7 +394,7 @@ let ProfileElementRenderer = class ProfileElementRenderer {
|
|
|
394
394
|
const label = append(container, $('.profile-list-item-label'));
|
|
395
395
|
const dirty = append(container, $(`span${ThemeIcon.asCSSSelector(Codicon.circleFilled)}`));
|
|
396
396
|
const description = append(container, $('.profile-list-item-description'));
|
|
397
|
-
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(
|
|
397
|
+
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(11835, "Active"))));
|
|
398
398
|
const actionsContainer = append(container, $('.profile-tree-item-actions-container'));
|
|
399
399
|
const actionBar = disposables.add(this.instantiationService.createInstance(WorkbenchToolBar, actionsContainer, {
|
|
400
400
|
hoverDelegate: disposables.add(createInstantHoverDelegate()),
|
|
@@ -734,15 +734,17 @@ class AbstractProfileResourceTreeRenderer extends Disposable {
|
|
|
734
734
|
getResourceTypeTitle(resourceType) {
|
|
735
735
|
switch (resourceType) {
|
|
736
736
|
case ProfileResourceType.Settings:
|
|
737
|
-
return localize(
|
|
737
|
+
return localize(11836, "Settings");
|
|
738
738
|
case ProfileResourceType.Keybindings:
|
|
739
|
-
return localize(
|
|
739
|
+
return localize(11837, "Keyboard Shortcuts");
|
|
740
740
|
case ProfileResourceType.Snippets:
|
|
741
|
-
return localize(
|
|
741
|
+
return localize(11838, "Snippets");
|
|
742
742
|
case ProfileResourceType.Tasks:
|
|
743
|
-
return localize(
|
|
743
|
+
return localize(11839, "Tasks");
|
|
744
|
+
case ProfileResourceType.Mcp:
|
|
745
|
+
return localize(11840, "MCP Servers");
|
|
744
746
|
case ProfileResourceType.Extensions:
|
|
745
|
-
return localize(
|
|
747
|
+
return localize(11841, "Extensions");
|
|
746
748
|
}
|
|
747
749
|
return '';
|
|
748
750
|
}
|
|
@@ -771,18 +773,18 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
771
773
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
772
774
|
let profileElement;
|
|
773
775
|
const nameContainer = append(parent, $('.profile-row-container'));
|
|
774
|
-
append(nameContainer, $('.profile-label-element', undefined, ( localize(
|
|
776
|
+
append(nameContainer, $('.profile-label-element', undefined, ( localize(11842, "Name"))));
|
|
775
777
|
const nameInput = disposables.add(( new InputBox(nameContainer, this.contextViewService, {
|
|
776
778
|
inputBoxStyles: getInputBoxStyle({
|
|
777
779
|
inputBorder: settingsTextInputBorder
|
|
778
780
|
}),
|
|
779
|
-
ariaLabel: ( localize(
|
|
780
|
-
placeholder: ( localize(
|
|
781
|
+
ariaLabel: ( localize(11843, "Profile Name")),
|
|
782
|
+
placeholder: ( localize(11843, "Profile Name")),
|
|
781
783
|
validationOptions: {
|
|
782
784
|
validation: (value) => {
|
|
783
785
|
if (!value) {
|
|
784
786
|
return {
|
|
785
|
-
content: ( localize(
|
|
787
|
+
content: ( localize(11844, "Profile name is required and must be a non-empty value.")),
|
|
786
788
|
type: MessageType.WARNING
|
|
787
789
|
};
|
|
788
790
|
}
|
|
@@ -796,7 +798,7 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
796
798
|
value = value.trim();
|
|
797
799
|
if (initialName !== value && ( this.userDataProfilesService.profiles.some(p => !p.isTransient && p.name === value))) {
|
|
798
800
|
return {
|
|
799
|
-
content: ( localize(
|
|
801
|
+
content: ( localize(11845, "Profile with name {0} already exists.", value)),
|
|
800
802
|
type: MessageType.WARNING
|
|
801
803
|
};
|
|
802
804
|
}
|
|
@@ -826,10 +828,10 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
826
828
|
nameInput.enable();
|
|
827
829
|
}
|
|
828
830
|
if (isDefaultProfile) {
|
|
829
|
-
nameInput.setTooltip(( localize(
|
|
831
|
+
nameInput.setTooltip(( localize(11846, "Name cannot be changed for the default profile")));
|
|
830
832
|
}
|
|
831
833
|
else {
|
|
832
|
-
nameInput.setTooltip(( localize(
|
|
834
|
+
nameInput.setTooltip(( localize(11843, "Profile Name")));
|
|
833
835
|
}
|
|
834
836
|
};
|
|
835
837
|
return {
|
|
@@ -867,9 +869,9 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
867
869
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
868
870
|
let profileElement;
|
|
869
871
|
const iconContainer = append(parent, $('.profile-row-container'));
|
|
870
|
-
append(iconContainer, $('.profile-label-element', undefined, ( localize(
|
|
872
|
+
append(iconContainer, $('.profile-label-element', undefined, ( localize(11847, "Icon"))));
|
|
871
873
|
const iconValueContainer = append(iconContainer, $('.profile-icon-container'));
|
|
872
|
-
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(
|
|
874
|
+
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(11848, "Profile Icon")) }));
|
|
873
875
|
const iconHover = disposables.add(this.hoverService.setupManagedHover(this.hoverDelegate, iconElement, ''));
|
|
874
876
|
const iconSelectBox = disposables.add(this.instantiationService.createInstance(WorkbenchIconSelectBox, { icons: ICONS, inputBoxStyles: defaultInputBoxStyles }));
|
|
875
877
|
let hoverWidget;
|
|
@@ -928,14 +930,14 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
928
930
|
profileElement.root.icon = selectedIcon.id;
|
|
929
931
|
}
|
|
930
932
|
}));
|
|
931
|
-
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(
|
|
933
|
+
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(11849, "Profile icon to be shown in the activity bar"))));
|
|
932
934
|
const renderIcon = (profileElement) => {
|
|
933
935
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.profile.isDefault) {
|
|
934
936
|
iconValueContainer.classList.add('disabled');
|
|
935
|
-
iconHover.update(( localize(
|
|
937
|
+
iconHover.update(( localize(11850, "Icon cannot be changed for the default profile")));
|
|
936
938
|
}
|
|
937
939
|
else {
|
|
938
|
-
iconHover.update(( localize(
|
|
940
|
+
iconHover.update(( localize(11851, "Click to change icon")));
|
|
939
941
|
iconValueContainer.classList.remove('disabled');
|
|
940
942
|
}
|
|
941
943
|
if (profileElement.root.icon) {
|
|
@@ -975,9 +977,9 @@ let UseForCurrentWindowPropertyRenderer = class UseForCurrentWindowPropertyRende
|
|
|
975
977
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
976
978
|
let profileElement;
|
|
977
979
|
const useForCurrentWindowContainer = append(parent, $('.profile-row-container'));
|
|
978
|
-
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(
|
|
980
|
+
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(11852, "Use for Current Window"))));
|
|
979
981
|
const useForCurrentWindowValueContainer = append(useForCurrentWindowContainer, $('.profile-use-for-current-container'));
|
|
980
|
-
const useForCurrentWindowTitle = ( localize(
|
|
982
|
+
const useForCurrentWindowTitle = ( localize(11853, "Use this profile for the current window"));
|
|
981
983
|
const useForCurrentWindowCheckbox = disposables.add(( new Checkbox(useForCurrentWindowTitle, false, defaultCheckboxStyles)));
|
|
982
984
|
append(useForCurrentWindowValueContainer, useForCurrentWindowCheckbox.domNode);
|
|
983
985
|
const useForCurrentWindowLabel = append(useForCurrentWindowValueContainer, $('.profile-description-element', undefined, useForCurrentWindowTitle));
|
|
@@ -1027,9 +1029,9 @@ class UseAsDefaultProfileRenderer extends ProfilePropertyRenderer {
|
|
|
1027
1029
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1028
1030
|
let profileElement;
|
|
1029
1031
|
const useAsDefaultProfileContainer = append(parent, $('.profile-row-container'));
|
|
1030
|
-
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(
|
|
1032
|
+
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(11854, "Use for New Windows"))));
|
|
1031
1033
|
const useAsDefaultProfileValueContainer = append(useAsDefaultProfileContainer, $('.profile-use-as-default-container'));
|
|
1032
|
-
const useAsDefaultProfileTitle = ( localize(
|
|
1034
|
+
const useAsDefaultProfileTitle = ( localize(11855, "Use this profile as the default for new windows"));
|
|
1033
1035
|
const useAsDefaultProfileCheckbox = disposables.add(( new Checkbox(useAsDefaultProfileTitle, false, defaultCheckboxStyles)));
|
|
1034
1036
|
append(useAsDefaultProfileValueContainer, useAsDefaultProfileCheckbox.domNode);
|
|
1035
1037
|
const useAsDefaultProfileLabel = append(useAsDefaultProfileValueContainer, $('.profile-description-element', undefined, useAsDefaultProfileTitle));
|
|
@@ -1076,11 +1078,11 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1076
1078
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1077
1079
|
let profileElement;
|
|
1078
1080
|
const copyFromContainer = append(parent, $('.profile-row-container.profile-copy-from-container'));
|
|
1079
|
-
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(
|
|
1080
|
-
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(
|
|
1081
|
+
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(11856, "Copy from"))));
|
|
1082
|
+
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(11857, "Select the profile source from which you want to copy contents"))));
|
|
1081
1083
|
const copyFromSelectBox = disposables.add(this.instantiationService.createInstance(SelectBox, [], 0, this.contextViewService, defaultSelectBoxStyles, {
|
|
1082
1084
|
useCustomDrawn: true,
|
|
1083
|
-
ariaLabel: ( localize(
|
|
1085
|
+
ariaLabel: ( localize(11858, "Copy profile from")),
|
|
1084
1086
|
}));
|
|
1085
1087
|
copyFromSelectBox.render(append(copyFromContainer, $('.profile-select-container')));
|
|
1086
1088
|
const render = (profileElement, copyFromOptions) => {
|
|
@@ -1124,19 +1126,19 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1124
1126
|
getCopyFromOptions(profileElement) {
|
|
1125
1127
|
const separator = { text: '\u2500\u2500\u2500\u2500\u2500\u2500', isDisabled: true };
|
|
1126
1128
|
const copyFromOptions = [];
|
|
1127
|
-
copyFromOptions.push({ text: ( localize(
|
|
1129
|
+
copyFromOptions.push({ text: ( localize(11859, "None")) });
|
|
1128
1130
|
for (const [copyFromTemplate, name] of profileElement.copyFromTemplates) {
|
|
1129
1131
|
if (!( this.templates.some(template => this.uriIdentityService.extUri.isEqual(( URI.parse(template.url)), copyFromTemplate)))) {
|
|
1130
1132
|
copyFromOptions.push({ text: `${name} (${basename(copyFromTemplate)})`, id: ( copyFromTemplate.toString()), source: copyFromTemplate });
|
|
1131
1133
|
}
|
|
1132
1134
|
}
|
|
1133
1135
|
if (this.templates.length) {
|
|
1134
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1136
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(11860, "Profile Templates")) });
|
|
1135
1137
|
for (const template of this.templates) {
|
|
1136
1138
|
copyFromOptions.push({ text: template.name, id: template.url, source: ( URI.parse(template.url)) });
|
|
1137
1139
|
}
|
|
1138
1140
|
}
|
|
1139
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1141
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(11861, "Existing Profiles")) });
|
|
1140
1142
|
for (const profile of this.userDataProfilesService.profiles) {
|
|
1141
1143
|
if (!profile.isTransient) {
|
|
1142
1144
|
copyFromOptions.push({ text: profile.name, id: profile.id, source: profile });
|
|
@@ -1168,11 +1170,11 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1168
1170
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1169
1171
|
let profileElement;
|
|
1170
1172
|
const configureRowContainer = append(parent, $('.profile-row-container'));
|
|
1171
|
-
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1173
|
+
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(11862, "Contents"))));
|
|
1172
1174
|
const contentsDescriptionElement = append(configureRowContainer, $('.profile-description-element'));
|
|
1173
1175
|
const contentsTreeHeader = append(configureRowContainer, $('.profile-content-tree-header'));
|
|
1174
|
-
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(
|
|
1175
|
-
append(contentsTreeHeader, $(''), $('', undefined, ( localize(
|
|
1176
|
+
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(11863, "Source"))));
|
|
1177
|
+
append(contentsTreeHeader, $(''), $('', undefined, ( localize(11862, "Contents"))), optionsLabel, $(''));
|
|
1176
1178
|
const delegate = ( new ProfileContentTreeElementDelegate());
|
|
1177
1179
|
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, [
|
|
1178
1180
|
this.instantiationService.createInstance(ExistingProfileResourceTreeRenderer),
|
|
@@ -1244,27 +1246,27 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1244
1246
|
clearNode(contentsDescriptionElement);
|
|
1245
1247
|
const markdown = ( new MarkdownString());
|
|
1246
1248
|
if (element.root instanceof UserDataProfileElement && element.root.profile.isDefault) {
|
|
1247
|
-
markdown.appendMarkdown(( localize(
|
|
1249
|
+
markdown.appendMarkdown(( localize(11864, "Browse contents of this profile\n")));
|
|
1248
1250
|
}
|
|
1249
1251
|
else {
|
|
1250
|
-
markdown.appendMarkdown(( localize(
|
|
1252
|
+
markdown.appendMarkdown(( localize(11865, "Configure source of contents for this profile\n")));
|
|
1251
1253
|
if (element.root instanceof NewProfileElement) {
|
|
1252
1254
|
const copyFromName = element.root.getCopyFromName();
|
|
1253
1255
|
const optionName = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1254
|
-
? ( localize(
|
|
1256
|
+
? ( localize(11866, "{0} (Copy)", copyFromName))
|
|
1255
1257
|
: copyFromName;
|
|
1256
1258
|
if (optionName) {
|
|
1257
1259
|
markdown
|
|
1258
1260
|
.appendMarkdown(( localize(
|
|
1259
|
-
|
|
1261
|
+
11867,
|
|
1260
1262
|
"- *{0}:* Copy contents from the {1} profile\n",
|
|
1261
1263
|
optionName,
|
|
1262
1264
|
copyFromName
|
|
1263
1265
|
)));
|
|
1264
1266
|
}
|
|
1265
1267
|
markdown
|
|
1266
|
-
.appendMarkdown(( localize(
|
|
1267
|
-
.appendMarkdown(( localize(
|
|
1268
|
+
.appendMarkdown(( localize(11868, "- *Default:* Use contents from the Default profile\n")))
|
|
1269
|
+
.appendMarkdown(( localize(11869, "- *None:* Create empty contents\n")));
|
|
1268
1270
|
}
|
|
1269
1271
|
}
|
|
1270
1272
|
append(contentsDescriptionElement, elementDisposables.add(renderMarkdown(markdown)).element);
|
|
@@ -1325,7 +1327,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1325
1327
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1326
1328
|
let profileElement;
|
|
1327
1329
|
const profileWorkspacesRowContainer = append(parent, $('.profile-row-container'));
|
|
1328
|
-
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1330
|
+
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(11870, "Folders & Workspaces"))));
|
|
1329
1331
|
const profileWorkspacesDescriptionElement = append(profileWorkspacesRowContainer, $('.profile-description-element'));
|
|
1330
1332
|
const workspacesTableContainer = append(profileWorkspacesRowContainer, $('.profile-associations-table'));
|
|
1331
1333
|
const table = this.workspacesTable = disposables.add(this.instantiationService.createInstance((WorkbenchTable), 'ProfileEditor-AssociationsTable', workspacesTableContainer, new class {
|
|
@@ -1344,14 +1346,14 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1344
1346
|
project(row) { return row; },
|
|
1345
1347
|
},
|
|
1346
1348
|
{
|
|
1347
|
-
label: ( localize(
|
|
1349
|
+
label: ( localize(11871, "Host")),
|
|
1348
1350
|
tooltip: '',
|
|
1349
1351
|
weight: 2,
|
|
1350
1352
|
templateId: WorkspaceUriHostColumnRenderer.TEMPLATE_ID,
|
|
1351
1353
|
project(row) { return row; },
|
|
1352
1354
|
},
|
|
1353
1355
|
{
|
|
1354
|
-
label: ( localize(
|
|
1356
|
+
label: ( localize(11872, "Path")),
|
|
1355
1357
|
tooltip: '',
|
|
1356
1358
|
weight: 7,
|
|
1357
1359
|
templateId: WorkspaceUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -1380,16 +1382,16 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1380
1382
|
getAriaLabel: (item) => {
|
|
1381
1383
|
const hostLabel = getHostLabel(this.labelService, item.workspace);
|
|
1382
1384
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
1383
|
-
return localize(
|
|
1385
|
+
return localize(11873, "{0}, trusted", this.labelService.getUriLabel(item.workspace));
|
|
1384
1386
|
}
|
|
1385
1387
|
return localize(
|
|
1386
|
-
|
|
1388
|
+
11874,
|
|
1387
1389
|
"{0} on {1}, trusted",
|
|
1388
1390
|
this.labelService.getUriLabel(item.workspace),
|
|
1389
1391
|
hostLabel
|
|
1390
1392
|
);
|
|
1391
1393
|
},
|
|
1392
|
-
getWidgetAriaLabel: () => ( localize(
|
|
1394
|
+
getWidgetAriaLabel: () => ( localize(11875, "Trusted Folders & Workspaces"))
|
|
1393
1395
|
},
|
|
1394
1396
|
identityProvider: {
|
|
1395
1397
|
getId(element) {
|
|
@@ -1406,15 +1408,15 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1406
1408
|
})));
|
|
1407
1409
|
const addButtonBarElement = append(profileWorkspacesRowContainer, $('.profile-workspaces-button-container'));
|
|
1408
1410
|
const buttonBar = disposables.add(( new ButtonBar(addButtonBarElement)));
|
|
1409
|
-
const addButton = this._register(buttonBar.addButton({ title: ( localize(
|
|
1410
|
-
addButton.label = ( localize(
|
|
1411
|
+
const addButton = this._register(buttonBar.addButton({ title: ( localize(11876, "Add Folder")), ...defaultButtonStyles }));
|
|
1412
|
+
addButton.label = ( localize(11876, "Add Folder"));
|
|
1411
1413
|
disposables.add(addButton.onDidClick(async () => {
|
|
1412
1414
|
const uris = await this.fileDialogService.showOpenDialog({
|
|
1413
1415
|
canSelectFiles: false,
|
|
1414
1416
|
canSelectFolders: true,
|
|
1415
1417
|
canSelectMany: true,
|
|
1416
|
-
openLabel: ( localize(
|
|
1417
|
-
title: ( localize(
|
|
1418
|
+
openLabel: ( localize(11877, "Add Folder")),
|
|
1419
|
+
title: ( localize(11878, "Select Folders To Add"))
|
|
1418
1420
|
});
|
|
1419
1421
|
if (uris) {
|
|
1420
1422
|
if (profileElement?.root instanceof UserDataProfileElement) {
|
|
@@ -1429,7 +1431,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1429
1431
|
}));
|
|
1430
1432
|
const updateTable = () => {
|
|
1431
1433
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.workspaces?.length) {
|
|
1432
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1434
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(11879, "Following folders and workspaces are using this profile"));
|
|
1433
1435
|
workspacesTableContainer.classList.remove('hide');
|
|
1434
1436
|
table.splice(0, table.length, ( profileElement.root.workspaces
|
|
1435
1437
|
.map(workspace => ({ workspace, profileElement: profileElement.root })))
|
|
@@ -1437,7 +1439,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1437
1439
|
this.layout();
|
|
1438
1440
|
}
|
|
1439
1441
|
else {
|
|
1440
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1442
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(11880, "No folders or workspaces are using this profile"));
|
|
1441
1443
|
workspacesTableContainer.classList.add('hide');
|
|
1442
1444
|
}
|
|
1443
1445
|
};
|
|
@@ -1511,13 +1513,13 @@ let ExistingProfileResourceTreeRenderer = class ExistingProfileResourceTreeRende
|
|
|
1511
1513
|
}
|
|
1512
1514
|
const updateRadioItems = () => {
|
|
1513
1515
|
templateData.radio.setItems([{
|
|
1514
|
-
text: ( localize(
|
|
1515
|
-
tooltip: ( localize(
|
|
1516
|
+
text: ( localize(11881, "Default")),
|
|
1517
|
+
tooltip: ( localize(11882, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1516
1518
|
isActive: root.getFlag(element.resourceType)
|
|
1517
1519
|
},
|
|
1518
1520
|
{
|
|
1519
1521
|
text: root.name,
|
|
1520
|
-
tooltip: ( localize(
|
|
1522
|
+
tooltip: ( localize(11883, "Use {0} from the {1} profile", resourceTypeTitle, root.name)),
|
|
1521
1523
|
isActive: !root.getFlag(element.resourceType)
|
|
1522
1524
|
}]);
|
|
1523
1525
|
};
|
|
@@ -1585,22 +1587,22 @@ let NewProfileResourceTreeRenderer = class NewProfileResourceTreeRenderer extend
|
|
|
1585
1587
|
templateData.label.textContent = resourceTypeTitle;
|
|
1586
1588
|
const renderRadioItems = () => {
|
|
1587
1589
|
const options = [{
|
|
1588
|
-
text: ( localize(
|
|
1589
|
-
tooltip: ( localize(
|
|
1590
|
+
text: ( localize(11881, "Default")),
|
|
1591
|
+
tooltip: ( localize(11882, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1590
1592
|
},
|
|
1591
1593
|
{
|
|
1592
|
-
text: ( localize(
|
|
1593
|
-
tooltip: ( localize(
|
|
1594
|
+
text: ( localize(11884, "None")),
|
|
1595
|
+
tooltip: ( localize(11885, "Create empty {0}", resourceTypeTitle))
|
|
1594
1596
|
}];
|
|
1595
1597
|
const copyFromName = root.getCopyFromName();
|
|
1596
1598
|
const name = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1597
|
-
? ( localize(
|
|
1599
|
+
? ( localize(11866, "{0} (Copy)", copyFromName))
|
|
1598
1600
|
: copyFromName;
|
|
1599
1601
|
if (root.copyFrom && name) {
|
|
1600
1602
|
templateData.radio.setItems([
|
|
1601
1603
|
{
|
|
1602
1604
|
text: name,
|
|
1603
|
-
tooltip: name ? ( localize(
|
|
1605
|
+
tooltip: name ? ( localize(11886, "Copy {0} from the {1} profile", resourceTypeTitle, name)) : ( localize(11887, "Copy")),
|
|
1604
1606
|
},
|
|
1605
1607
|
...options
|
|
1606
1608
|
]);
|
|
@@ -1821,7 +1823,7 @@ let ChangeProfileAction = class ChangeProfileAction {
|
|
|
1821
1823
|
this.label = 'Change Profile';
|
|
1822
1824
|
this.class = ThemeIcon.asClassName(editIcon);
|
|
1823
1825
|
this.enabled = true;
|
|
1824
|
-
this.tooltip = ( localize(
|
|
1826
|
+
this.tooltip = ( localize(11888, "Change Profile"));
|
|
1825
1827
|
this.checked = false;
|
|
1826
1828
|
}
|
|
1827
1829
|
run() { }
|
|
@@ -1895,7 +1897,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1895
1897
|
class: ThemeIcon.asClassName(Codicon.window),
|
|
1896
1898
|
enabled: !this.uriIdentityService.extUri.isEqual(item.workspace, item.profileElement.getCurrentWorkspace()),
|
|
1897
1899
|
id: 'openWorkspace',
|
|
1898
|
-
tooltip: ( localize(
|
|
1900
|
+
tooltip: ( localize(11889, "Open in New Window")),
|
|
1899
1901
|
run: () => item.profileElement.openWorkspace(item.workspace)
|
|
1900
1902
|
};
|
|
1901
1903
|
}
|
|
@@ -1905,7 +1907,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1905
1907
|
class: ThemeIcon.asClassName(removeIcon),
|
|
1906
1908
|
enabled: this.userDataProfileManagementService.getDefaultProfileToUse().id !== item.profileElement.profile.id,
|
|
1907
1909
|
id: 'deleteTrustedUri',
|
|
1908
|
-
tooltip: ( localize(
|
|
1910
|
+
tooltip: ( localize(11890, "Delete Path")),
|
|
1909
1911
|
run: () => item.profileElement.updateWorkspaces([], [item.workspace])
|
|
1910
1912
|
};
|
|
1911
1913
|
}
|
|
@@ -1920,7 +1922,7 @@ WorkspaceUriActionsColumnRenderer = WorkspaceUriActionsColumnRenderer_1 = ( __de
|
|
|
1920
1922
|
( __param(3, IUriIdentityService))
|
|
1921
1923
|
], WorkspaceUriActionsColumnRenderer));
|
|
1922
1924
|
function getHostLabel(labelService, workspaceUri) {
|
|
1923
|
-
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(
|
|
1925
|
+
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(11891, "Local"));
|
|
1924
1926
|
}
|
|
1925
1927
|
let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends EditorInput {
|
|
1926
1928
|
static { UserDataProfilesEditorInput_1 = this; }
|
|
@@ -1941,7 +1943,7 @@ let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends Edit
|
|
|
1941
1943
|
this._register(this.model.onDidChange(e => this.dirty = ( this.model.profiles.some(profile => profile instanceof NewProfileElement))));
|
|
1942
1944
|
}
|
|
1943
1945
|
get typeId() { return UserDataProfilesEditorInput_1.ID; }
|
|
1944
|
-
getName() { return localize(
|
|
1946
|
+
getName() { return localize(11892, "Profiles"); }
|
|
1945
1947
|
getIcon() { return defaultUserDataProfileIcon; }
|
|
1946
1948
|
async resolve() {
|
|
1947
1949
|
await this.model.resolve();
|
package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { IUserDataProfileManagementService } from "@codingame/monaco-vscode-api/
|
|
|
11
11
|
import { IUserDataProfileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service";
|
|
12
12
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
13
13
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
14
|
-
import { EditorModel } from "@codingame/monaco-vscode-
|
|
14
|
+
import { EditorModel } from "@codingame/monaco-vscode-ca445022-b812-53ca-a041-e46c7e0b13de-common/vscode/vs/workbench/common/editor/editorModel";
|
|
15
15
|
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
16
16
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
17
17
|
import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service";
|