@codingame/monaco-vscode-user-data-profile-service-override 14.0.3 → 14.0.4
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 +15 -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 +78 -78
- 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 -40
- package/vscode/src/vs/workbench/services/userDataProfile/browser/userDataProfileManagement.js +8 -8
|
@@ -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(10717, 'Icon for the edit folder icon in the profiles editor.')));
|
|
77
|
+
const removeIcon = registerIcon('profiles-editor-remove-folder', Codicon.close, ( localize(10718, 'Icon for the remove folder icon in the profiles editor.')));
|
|
78
|
+
const profilesSashBorder = registerColor('profiles.sashBorder', PANEL_BORDER, ( localize(10719, "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(10720, "Profiles");
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
177
|
openOnSingleClick: true,
|
|
@@ -192,10 +192,10 @@ 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(10721, "From Template")), this.getCreateFromTemplateActions())));
|
|
196
196
|
actions.push(( new Separator()));
|
|
197
197
|
}
|
|
198
|
-
actions.push(( new Action('importProfile', ( localize(
|
|
198
|
+
actions.push(( new Action('importProfile', ( localize(10722, "Import Profile...")), undefined, true, () => this.importProfile())));
|
|
199
199
|
return actions;
|
|
200
200
|
}
|
|
201
201
|
},
|
|
@@ -204,7 +204,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
204
204
|
supportIcons: true,
|
|
205
205
|
...defaultButtonStyles
|
|
206
206
|
})));
|
|
207
|
-
button.label = ( localize(
|
|
207
|
+
button.label = ( localize(10723, "New Profile"));
|
|
208
208
|
this._register(button.onDidClick(e => this.createNewProfile()));
|
|
209
209
|
}
|
|
210
210
|
getCreateFromTemplateActions() {
|
|
@@ -249,13 +249,13 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
249
249
|
}
|
|
250
250
|
getTreeContextMenuActions() {
|
|
251
251
|
const actions = [];
|
|
252
|
-
actions.push(( new Action('newProfile', ( localize(
|
|
252
|
+
actions.push(( new Action('newProfile', ( localize(10723, "New Profile")), undefined, true, () => this.createNewProfile())));
|
|
253
253
|
const templateActions = this.getCreateFromTemplateActions();
|
|
254
254
|
if (templateActions.length) {
|
|
255
|
-
actions.push(( new SubmenuAction('from.template', ( localize(
|
|
255
|
+
actions.push(( new SubmenuAction('from.template', ( localize(10724, "New Profile From Template")), templateActions)));
|
|
256
256
|
}
|
|
257
257
|
actions.push(( new Separator()));
|
|
258
|
-
actions.push(( new Action('importProfile', ( localize(
|
|
258
|
+
actions.push(( new Action('importProfile', ( localize(10722, "Import Profile...")), undefined, true, () => this.importProfile())));
|
|
259
259
|
return actions;
|
|
260
260
|
}
|
|
261
261
|
async importProfile() {
|
|
@@ -264,13 +264,13 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
264
264
|
const updateQuickPickItems = (value) => {
|
|
265
265
|
const quickPickItems = [];
|
|
266
266
|
if (value) {
|
|
267
|
-
quickPickItems.push({ label: quickPick.value, description: ( localize(
|
|
267
|
+
quickPickItems.push({ label: quickPick.value, description: ( localize(10725, "Import from URL")) });
|
|
268
268
|
}
|
|
269
|
-
quickPickItems.push({ label: ( localize(
|
|
269
|
+
quickPickItems.push({ label: ( localize(10726, "Select File...")) });
|
|
270
270
|
quickPick.items = quickPickItems;
|
|
271
271
|
};
|
|
272
|
-
quickPick.title = ( localize(
|
|
273
|
-
quickPick.placeholder = ( localize(
|
|
272
|
+
quickPick.title = ( localize(10727, "Import from Profile Template..."));
|
|
273
|
+
quickPick.placeholder = ( localize(10728, "Provide Profile Template URL"));
|
|
274
274
|
quickPick.ignoreFocusOut = true;
|
|
275
275
|
disposables.add(quickPick.onDidChangeValue(updateQuickPickItems));
|
|
276
276
|
updateQuickPickItems();
|
|
@@ -305,7 +305,7 @@ let UserDataProfilesEditor = class UserDataProfilesEditor extends EditorPane {
|
|
|
305
305
|
canSelectFiles: true,
|
|
306
306
|
canSelectMany: false,
|
|
307
307
|
filters: PROFILE_FILTER,
|
|
308
|
-
title: ( localize(
|
|
308
|
+
title: ( localize(10729, "Select Profile Template File")),
|
|
309
309
|
});
|
|
310
310
|
if (!profileLocation) {
|
|
311
311
|
return null;
|
|
@@ -382,7 +382,7 @@ let ProfileElementRenderer = class ProfileElementRenderer {
|
|
|
382
382
|
const label = append(container, $('.profile-list-item-label'));
|
|
383
383
|
const dirty = append(container, $(`span${ThemeIcon.asCSSSelector(Codicon.circleFilled)}`));
|
|
384
384
|
const description = append(container, $('.profile-list-item-description'));
|
|
385
|
-
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(
|
|
385
|
+
append(description, $(`span${ThemeIcon.asCSSSelector(Codicon.check)}`), $('span', undefined, ( localize(10730, "Active"))));
|
|
386
386
|
const actionsContainer = append(container, $('.profile-tree-item-actions-container'));
|
|
387
387
|
const actionBar = disposables.add(this.instantiationService.createInstance(WorkbenchToolBar, actionsContainer, {
|
|
388
388
|
hoverDelegate: disposables.add(createInstantHoverDelegate()),
|
|
@@ -722,15 +722,15 @@ class AbstractProfileResourceTreeRenderer extends Disposable {
|
|
|
722
722
|
getResourceTypeTitle(resourceType) {
|
|
723
723
|
switch (resourceType) {
|
|
724
724
|
case ProfileResourceType.Settings:
|
|
725
|
-
return localize(
|
|
725
|
+
return localize(10731, "Settings");
|
|
726
726
|
case ProfileResourceType.Keybindings:
|
|
727
|
-
return localize(
|
|
727
|
+
return localize(10732, "Keyboard Shortcuts");
|
|
728
728
|
case ProfileResourceType.Snippets:
|
|
729
|
-
return localize(
|
|
729
|
+
return localize(10733, "Snippets");
|
|
730
730
|
case ProfileResourceType.Tasks:
|
|
731
|
-
return localize(
|
|
731
|
+
return localize(10734, "Tasks");
|
|
732
732
|
case ProfileResourceType.Extensions:
|
|
733
|
-
return localize(
|
|
733
|
+
return localize(10735, "Extensions");
|
|
734
734
|
}
|
|
735
735
|
return '';
|
|
736
736
|
}
|
|
@@ -759,18 +759,18 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
759
759
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
760
760
|
let profileElement;
|
|
761
761
|
const nameContainer = append(parent, $('.profile-row-container'));
|
|
762
|
-
append(nameContainer, $('.profile-label-element', undefined, ( localize(
|
|
762
|
+
append(nameContainer, $('.profile-label-element', undefined, ( localize(10736, "Name"))));
|
|
763
763
|
const nameInput = disposables.add(( new InputBox(nameContainer, this.contextViewService, {
|
|
764
764
|
inputBoxStyles: getInputBoxStyle({
|
|
765
765
|
inputBorder: settingsTextInputBorder
|
|
766
766
|
}),
|
|
767
|
-
ariaLabel: ( localize(
|
|
768
|
-
placeholder: ( localize(
|
|
767
|
+
ariaLabel: ( localize(10737, "Profile Name")),
|
|
768
|
+
placeholder: ( localize(10737, "Profile Name")),
|
|
769
769
|
validationOptions: {
|
|
770
770
|
validation: (value) => {
|
|
771
771
|
if (!value) {
|
|
772
772
|
return {
|
|
773
|
-
content: ( localize(
|
|
773
|
+
content: ( localize(10738, "Profile name is required and must be a non-empty value.")),
|
|
774
774
|
type: MessageType.WARNING
|
|
775
775
|
};
|
|
776
776
|
}
|
|
@@ -784,7 +784,7 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
784
784
|
value = value.trim();
|
|
785
785
|
if (initialName !== value && ( this.userDataProfilesService.profiles.some(p => !p.isTransient && p.name === value))) {
|
|
786
786
|
return {
|
|
787
|
-
content: ( localize(
|
|
787
|
+
content: ( localize(10739, "Profile with name {0} already exists.", value)),
|
|
788
788
|
type: MessageType.WARNING
|
|
789
789
|
};
|
|
790
790
|
}
|
|
@@ -814,10 +814,10 @@ let ProfileNameRenderer = class ProfileNameRenderer extends ProfilePropertyRende
|
|
|
814
814
|
nameInput.enable();
|
|
815
815
|
}
|
|
816
816
|
if (isDefaultProfile) {
|
|
817
|
-
nameInput.setTooltip(( localize(
|
|
817
|
+
nameInput.setTooltip(( localize(10740, "Name cannot be changed for the default profile")));
|
|
818
818
|
}
|
|
819
819
|
else {
|
|
820
|
-
nameInput.setTooltip(( localize(
|
|
820
|
+
nameInput.setTooltip(( localize(10737, "Profile Name")));
|
|
821
821
|
}
|
|
822
822
|
};
|
|
823
823
|
return {
|
|
@@ -855,9 +855,9 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
855
855
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
856
856
|
let profileElement;
|
|
857
857
|
const iconContainer = append(parent, $('.profile-row-container'));
|
|
858
|
-
append(iconContainer, $('.profile-label-element', undefined, ( localize(
|
|
858
|
+
append(iconContainer, $('.profile-label-element', undefined, ( localize(10741, "Icon"))));
|
|
859
859
|
const iconValueContainer = append(iconContainer, $('.profile-icon-container'));
|
|
860
|
-
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(
|
|
860
|
+
const iconElement = append(iconValueContainer, $(`${ThemeIcon.asCSSSelector(DEFAULT_ICON)}`, { 'tabindex': '0', 'role': 'button', 'aria-label': ( localize(10742, "Profile Icon")) }));
|
|
861
861
|
const iconHover = disposables.add(this.hoverService.setupManagedHover(this.hoverDelegate, iconElement, ''));
|
|
862
862
|
const iconSelectBox = disposables.add(this.instantiationService.createInstance(WorkbenchIconSelectBox, { icons: ICONS, inputBoxStyles: defaultInputBoxStyles }));
|
|
863
863
|
let hoverWidget;
|
|
@@ -916,14 +916,14 @@ let ProfileIconRenderer = class ProfileIconRenderer extends ProfilePropertyRende
|
|
|
916
916
|
profileElement.root.icon = selectedIcon.id;
|
|
917
917
|
}
|
|
918
918
|
}));
|
|
919
|
-
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(
|
|
919
|
+
append(iconValueContainer, $('.profile-description-element', undefined, ( localize(10743, "Profile icon to be shown in the activity bar"))));
|
|
920
920
|
const renderIcon = (profileElement) => {
|
|
921
921
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.profile.isDefault) {
|
|
922
922
|
iconValueContainer.classList.add('disabled');
|
|
923
|
-
iconHover.update(( localize(
|
|
923
|
+
iconHover.update(( localize(10744, "Icon cannot be changed for the default profile")));
|
|
924
924
|
}
|
|
925
925
|
else {
|
|
926
|
-
iconHover.update(( localize(
|
|
926
|
+
iconHover.update(( localize(10745, "Click to change icon")));
|
|
927
927
|
iconValueContainer.classList.remove('disabled');
|
|
928
928
|
}
|
|
929
929
|
if (profileElement.root.icon) {
|
|
@@ -963,9 +963,9 @@ let UseForCurrentWindowPropertyRenderer = class UseForCurrentWindowPropertyRende
|
|
|
963
963
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
964
964
|
let profileElement;
|
|
965
965
|
const useForCurrentWindowContainer = append(parent, $('.profile-row-container'));
|
|
966
|
-
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(
|
|
966
|
+
append(useForCurrentWindowContainer, $('.profile-label-element', undefined, ( localize(10746, "Use for Current Window"))));
|
|
967
967
|
const useForCurrentWindowValueContainer = append(useForCurrentWindowContainer, $('.profile-use-for-current-container'));
|
|
968
|
-
const useForCurrentWindowTitle = ( localize(
|
|
968
|
+
const useForCurrentWindowTitle = ( localize(10747, "Use this profile for the current window"));
|
|
969
969
|
const useForCurrentWindowCheckbox = disposables.add(( new Checkbox(useForCurrentWindowTitle, false, defaultCheckboxStyles)));
|
|
970
970
|
append(useForCurrentWindowValueContainer, useForCurrentWindowCheckbox.domNode);
|
|
971
971
|
const useForCurrentWindowLabel = append(useForCurrentWindowValueContainer, $('.profile-description-element', undefined, useForCurrentWindowTitle));
|
|
@@ -1015,9 +1015,9 @@ class UseAsDefaultProfileRenderer extends ProfilePropertyRenderer {
|
|
|
1015
1015
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1016
1016
|
let profileElement;
|
|
1017
1017
|
const useAsDefaultProfileContainer = append(parent, $('.profile-row-container'));
|
|
1018
|
-
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(
|
|
1018
|
+
append(useAsDefaultProfileContainer, $('.profile-label-element', undefined, ( localize(10748, "Use for New Windows"))));
|
|
1019
1019
|
const useAsDefaultProfileValueContainer = append(useAsDefaultProfileContainer, $('.profile-use-as-default-container'));
|
|
1020
|
-
const useAsDefaultProfileTitle = ( localize(
|
|
1020
|
+
const useAsDefaultProfileTitle = ( localize(10749, "Use this profile as the default for new windows"));
|
|
1021
1021
|
const useAsDefaultProfileCheckbox = disposables.add(( new Checkbox(useAsDefaultProfileTitle, false, defaultCheckboxStyles)));
|
|
1022
1022
|
append(useAsDefaultProfileValueContainer, useAsDefaultProfileCheckbox.domNode);
|
|
1023
1023
|
const useAsDefaultProfileLabel = append(useAsDefaultProfileValueContainer, $('.profile-description-element', undefined, useAsDefaultProfileTitle));
|
|
@@ -1064,11 +1064,11 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1064
1064
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1065
1065
|
let profileElement;
|
|
1066
1066
|
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(
|
|
1067
|
+
append(copyFromContainer, $('.profile-label-element', undefined, ( localize(10750, "Copy from"))));
|
|
1068
|
+
append(copyFromContainer, $('.profile-description-element', undefined, ( localize(10751, "Select the profile source from which you want to copy contents"))));
|
|
1069
1069
|
const copyFromSelectBox = disposables.add(this.instantiationService.createInstance(SelectBox, [], 0, this.contextViewService, defaultSelectBoxStyles, {
|
|
1070
1070
|
useCustomDrawn: true,
|
|
1071
|
-
ariaLabel: ( localize(
|
|
1071
|
+
ariaLabel: ( localize(10752, "Copy profile from")),
|
|
1072
1072
|
}));
|
|
1073
1073
|
copyFromSelectBox.render(append(copyFromContainer, $('.profile-select-container')));
|
|
1074
1074
|
const render = (profileElement, copyFromOptions) => {
|
|
@@ -1112,19 +1112,19 @@ let CopyFromProfileRenderer = class CopyFromProfileRenderer extends ProfilePrope
|
|
|
1112
1112
|
getCopyFromOptions(profileElement) {
|
|
1113
1113
|
const separator = { text: '\u2500\u2500\u2500\u2500\u2500\u2500', isDisabled: true };
|
|
1114
1114
|
const copyFromOptions = [];
|
|
1115
|
-
copyFromOptions.push({ text: ( localize(
|
|
1115
|
+
copyFromOptions.push({ text: ( localize(10753, "None")) });
|
|
1116
1116
|
for (const [copyFromTemplate, name] of profileElement.copyFromTemplates) {
|
|
1117
1117
|
if (!( this.templates.some(template => this.uriIdentityService.extUri.isEqual(( URI.parse(template.url)), copyFromTemplate)))) {
|
|
1118
1118
|
copyFromOptions.push({ text: `${name} (${basename(copyFromTemplate)})`, id: ( copyFromTemplate.toString()), source: copyFromTemplate });
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
1121
|
if (this.templates.length) {
|
|
1122
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1122
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(10754, "Profile Templates")) });
|
|
1123
1123
|
for (const template of this.templates) {
|
|
1124
1124
|
copyFromOptions.push({ text: template.name, id: template.url, source: ( URI.parse(template.url)) });
|
|
1125
1125
|
}
|
|
1126
1126
|
}
|
|
1127
|
-
copyFromOptions.push({ ...separator, decoratorRight: ( localize(
|
|
1127
|
+
copyFromOptions.push({ ...separator, decoratorRight: ( localize(10755, "Existing Profiles")) });
|
|
1128
1128
|
for (const profile of this.userDataProfilesService.profiles) {
|
|
1129
1129
|
if (!profile.isTransient) {
|
|
1130
1130
|
copyFromOptions.push({ text: profile.name, id: profile.id, source: profile });
|
|
@@ -1156,11 +1156,11 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1156
1156
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1157
1157
|
let profileElement;
|
|
1158
1158
|
const configureRowContainer = append(parent, $('.profile-row-container'));
|
|
1159
|
-
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1159
|
+
append(configureRowContainer, $('.profile-label-element', undefined, ( localize(10756, "Contents"))));
|
|
1160
1160
|
const contentsDescriptionElement = append(configureRowContainer, $('.profile-description-element'));
|
|
1161
1161
|
const contentsTreeHeader = append(configureRowContainer, $('.profile-content-tree-header'));
|
|
1162
|
-
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(
|
|
1163
|
-
append(contentsTreeHeader, $(''), $('', undefined, ( localize(
|
|
1162
|
+
const optionsLabel = $('.options-header', undefined, $('span', undefined, ( localize(10757, "Source"))));
|
|
1163
|
+
append(contentsTreeHeader, $(''), $('', undefined, ( localize(10756, "Contents"))), optionsLabel, $(''));
|
|
1164
1164
|
const delegate = ( new ProfileContentTreeElementDelegate());
|
|
1165
1165
|
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
1166
|
this.instantiationService.createInstance(ExistingProfileResourceTreeRenderer),
|
|
@@ -1232,27 +1232,27 @@ let ContentsProfileRenderer = class ContentsProfileRenderer extends ProfilePrope
|
|
|
1232
1232
|
clearNode(contentsDescriptionElement);
|
|
1233
1233
|
const markdown = ( new MarkdownString());
|
|
1234
1234
|
if (element.root instanceof UserDataProfileElement && element.root.profile.isDefault) {
|
|
1235
|
-
markdown.appendMarkdown(( localize(
|
|
1235
|
+
markdown.appendMarkdown(( localize(10758, "Browse contents of this profile\n")));
|
|
1236
1236
|
}
|
|
1237
1237
|
else {
|
|
1238
|
-
markdown.appendMarkdown(( localize(
|
|
1238
|
+
markdown.appendMarkdown(( localize(10759, "Configure source of contents for this profile\n")));
|
|
1239
1239
|
if (element.root instanceof NewProfileElement) {
|
|
1240
1240
|
const copyFromName = element.root.getCopyFromName();
|
|
1241
1241
|
const optionName = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1242
|
-
? ( localize(
|
|
1242
|
+
? ( localize(10760, "{0} (Copy)", copyFromName))
|
|
1243
1243
|
: copyFromName;
|
|
1244
1244
|
if (optionName) {
|
|
1245
1245
|
markdown
|
|
1246
1246
|
.appendMarkdown(( localize(
|
|
1247
|
-
|
|
1247
|
+
10761,
|
|
1248
1248
|
"- *{0}:* Copy contents from the {1} profile\n",
|
|
1249
1249
|
optionName,
|
|
1250
1250
|
copyFromName
|
|
1251
1251
|
)));
|
|
1252
1252
|
}
|
|
1253
1253
|
markdown
|
|
1254
|
-
.appendMarkdown(( localize(
|
|
1255
|
-
.appendMarkdown(( localize(
|
|
1254
|
+
.appendMarkdown(( localize(10762, "- *Default:* Use contents from the Default profile\n")))
|
|
1255
|
+
.appendMarkdown(( localize(10763, "- *None:* Create empty contents\n")));
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
1258
1258
|
append(contentsDescriptionElement, elementDisposables.add(renderMarkdown(markdown)).element);
|
|
@@ -1313,7 +1313,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1313
1313
|
const elementDisposables = disposables.add(( new DisposableStore()));
|
|
1314
1314
|
let profileElement;
|
|
1315
1315
|
const profileWorkspacesRowContainer = append(parent, $('.profile-row-container'));
|
|
1316
|
-
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(
|
|
1316
|
+
append(profileWorkspacesRowContainer, $('.profile-label-element', undefined, ( localize(10764, "Folders & Workspaces"))));
|
|
1317
1317
|
const profileWorkspacesDescriptionElement = append(profileWorkspacesRowContainer, $('.profile-description-element'));
|
|
1318
1318
|
const workspacesTableContainer = append(profileWorkspacesRowContainer, $('.profile-associations-table'));
|
|
1319
1319
|
const table = this.workspacesTable = disposables.add(this.instantiationService.createInstance((WorkbenchTable), 'ProfileEditor-AssociationsTable', workspacesTableContainer, new class {
|
|
@@ -1332,14 +1332,14 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1332
1332
|
project(row) { return row; },
|
|
1333
1333
|
},
|
|
1334
1334
|
{
|
|
1335
|
-
label: ( localize(
|
|
1335
|
+
label: ( localize(10765, "Host")),
|
|
1336
1336
|
tooltip: '',
|
|
1337
1337
|
weight: 2,
|
|
1338
1338
|
templateId: WorkspaceUriHostColumnRenderer.TEMPLATE_ID,
|
|
1339
1339
|
project(row) { return row; },
|
|
1340
1340
|
},
|
|
1341
1341
|
{
|
|
1342
|
-
label: ( localize(
|
|
1342
|
+
label: ( localize(10766, "Path")),
|
|
1343
1343
|
tooltip: '',
|
|
1344
1344
|
weight: 7,
|
|
1345
1345
|
templateId: WorkspaceUriPathColumnRenderer.TEMPLATE_ID,
|
|
@@ -1368,16 +1368,16 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1368
1368
|
getAriaLabel: (item) => {
|
|
1369
1369
|
const hostLabel = getHostLabel(this.labelService, item.workspace);
|
|
1370
1370
|
if (hostLabel === undefined || hostLabel.length === 0) {
|
|
1371
|
-
return localize(
|
|
1371
|
+
return localize(10767, "{0}, trusted", this.labelService.getUriLabel(item.workspace));
|
|
1372
1372
|
}
|
|
1373
1373
|
return localize(
|
|
1374
|
-
|
|
1374
|
+
10768,
|
|
1375
1375
|
"{0} on {1}, trusted",
|
|
1376
1376
|
this.labelService.getUriLabel(item.workspace),
|
|
1377
1377
|
hostLabel
|
|
1378
1378
|
);
|
|
1379
1379
|
},
|
|
1380
|
-
getWidgetAriaLabel: () => ( localize(
|
|
1380
|
+
getWidgetAriaLabel: () => ( localize(10769, "Trusted Folders & Workspaces"))
|
|
1381
1381
|
},
|
|
1382
1382
|
identityProvider: {
|
|
1383
1383
|
getId(element) {
|
|
@@ -1394,15 +1394,15 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1394
1394
|
})));
|
|
1395
1395
|
const addButtonBarElement = append(profileWorkspacesRowContainer, $('.profile-workspaces-button-container'));
|
|
1396
1396
|
const buttonBar = disposables.add(( new ButtonBar(addButtonBarElement)));
|
|
1397
|
-
const addButton = this._register(buttonBar.addButton({ title: ( localize(
|
|
1398
|
-
addButton.label = ( localize(
|
|
1397
|
+
const addButton = this._register(buttonBar.addButton({ title: ( localize(10770, "Add Folder")), ...defaultButtonStyles }));
|
|
1398
|
+
addButton.label = ( localize(10770, "Add Folder"));
|
|
1399
1399
|
disposables.add(addButton.onDidClick(async () => {
|
|
1400
1400
|
const uris = await this.fileDialogService.showOpenDialog({
|
|
1401
1401
|
canSelectFiles: false,
|
|
1402
1402
|
canSelectFolders: true,
|
|
1403
1403
|
canSelectMany: true,
|
|
1404
|
-
openLabel: ( localize(
|
|
1405
|
-
title: ( localize(
|
|
1404
|
+
openLabel: ( localize(10771, "Add Folder")),
|
|
1405
|
+
title: ( localize(10772, "Select Folders To Add"))
|
|
1406
1406
|
});
|
|
1407
1407
|
if (uris) {
|
|
1408
1408
|
if (profileElement?.root instanceof UserDataProfileElement) {
|
|
@@ -1417,7 +1417,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1417
1417
|
}));
|
|
1418
1418
|
const updateTable = () => {
|
|
1419
1419
|
if (profileElement?.root instanceof UserDataProfileElement && profileElement.root.workspaces?.length) {
|
|
1420
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1420
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(10773, "Following folders and workspaces are using this profile"));
|
|
1421
1421
|
workspacesTableContainer.classList.remove('hide');
|
|
1422
1422
|
table.splice(0, table.length, ( profileElement.root.workspaces
|
|
1423
1423
|
.map(workspace => ({ workspace, profileElement: profileElement.root })))
|
|
@@ -1425,7 +1425,7 @@ let ProfileWorkspacesRenderer = class ProfileWorkspacesRenderer extends ProfileP
|
|
|
1425
1425
|
this.layout();
|
|
1426
1426
|
}
|
|
1427
1427
|
else {
|
|
1428
|
-
profileWorkspacesDescriptionElement.textContent = ( localize(
|
|
1428
|
+
profileWorkspacesDescriptionElement.textContent = ( localize(10774, "No folders or workspaces are using this profile"));
|
|
1429
1429
|
workspacesTableContainer.classList.add('hide');
|
|
1430
1430
|
}
|
|
1431
1431
|
};
|
|
@@ -1499,13 +1499,13 @@ let ExistingProfileResourceTreeRenderer = class ExistingProfileResourceTreeRende
|
|
|
1499
1499
|
}
|
|
1500
1500
|
const updateRadioItems = () => {
|
|
1501
1501
|
templateData.radio.setItems([{
|
|
1502
|
-
text: ( localize(
|
|
1503
|
-
tooltip: ( localize(
|
|
1502
|
+
text: ( localize(10775, "Default")),
|
|
1503
|
+
tooltip: ( localize(10776, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1504
1504
|
isActive: root.getFlag(element.resourceType)
|
|
1505
1505
|
},
|
|
1506
1506
|
{
|
|
1507
1507
|
text: root.name,
|
|
1508
|
-
tooltip: ( localize(
|
|
1508
|
+
tooltip: ( localize(10777, "Use {0} from the {1} profile", resourceTypeTitle, root.name)),
|
|
1509
1509
|
isActive: !root.getFlag(element.resourceType)
|
|
1510
1510
|
}]);
|
|
1511
1511
|
};
|
|
@@ -1573,22 +1573,22 @@ let NewProfileResourceTreeRenderer = class NewProfileResourceTreeRenderer extend
|
|
|
1573
1573
|
templateData.label.textContent = resourceTypeTitle;
|
|
1574
1574
|
const renderRadioItems = () => {
|
|
1575
1575
|
const options = [{
|
|
1576
|
-
text: ( localize(
|
|
1577
|
-
tooltip: ( localize(
|
|
1576
|
+
text: ( localize(10775, "Default")),
|
|
1577
|
+
tooltip: ( localize(10776, "Use {0} from the Default profile", resourceTypeTitle)),
|
|
1578
1578
|
},
|
|
1579
1579
|
{
|
|
1580
|
-
text: ( localize(
|
|
1581
|
-
tooltip: ( localize(
|
|
1580
|
+
text: ( localize(10778, "None")),
|
|
1581
|
+
tooltip: ( localize(10779, "Create empty {0}", resourceTypeTitle))
|
|
1582
1582
|
}];
|
|
1583
1583
|
const copyFromName = root.getCopyFromName();
|
|
1584
1584
|
const name = copyFromName === this.userDataProfilesService.defaultProfile.name
|
|
1585
|
-
? ( localize(
|
|
1585
|
+
? ( localize(10760, "{0} (Copy)", copyFromName))
|
|
1586
1586
|
: copyFromName;
|
|
1587
1587
|
if (root.copyFrom && name) {
|
|
1588
1588
|
templateData.radio.setItems([
|
|
1589
1589
|
{
|
|
1590
1590
|
text: name,
|
|
1591
|
-
tooltip: name ? ( localize(
|
|
1591
|
+
tooltip: name ? ( localize(10780, "Copy {0} from the {1} profile", resourceTypeTitle, name)) : ( localize(10781, "Copy")),
|
|
1592
1592
|
},
|
|
1593
1593
|
...options
|
|
1594
1594
|
]);
|
|
@@ -1806,7 +1806,7 @@ let ChangeProfileAction = class ChangeProfileAction extends Action {
|
|
|
1806
1806
|
super('changeProfile', '', ThemeIcon.asClassName(editIcon));
|
|
1807
1807
|
this.item = item;
|
|
1808
1808
|
this.userDataProfilesService = userDataProfilesService;
|
|
1809
|
-
this.tooltip = ( localize(
|
|
1809
|
+
this.tooltip = ( localize(10782, "Change Profile"));
|
|
1810
1810
|
}
|
|
1811
1811
|
getSwitchProfileActions() {
|
|
1812
1812
|
return ( this.userDataProfilesService.profiles
|
|
@@ -1878,7 +1878,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1878
1878
|
class: ThemeIcon.asClassName(Codicon.window),
|
|
1879
1879
|
enabled: !this.uriIdentityService.extUri.isEqual(item.workspace, item.profileElement.getCurrentWorkspace()),
|
|
1880
1880
|
id: 'openWorkspace',
|
|
1881
|
-
tooltip: ( localize(
|
|
1881
|
+
tooltip: ( localize(10783, "Open in New Window")),
|
|
1882
1882
|
run: () => item.profileElement.openWorkspace(item.workspace)
|
|
1883
1883
|
};
|
|
1884
1884
|
}
|
|
@@ -1888,7 +1888,7 @@ let WorkspaceUriActionsColumnRenderer = class WorkspaceUriActionsColumnRenderer
|
|
|
1888
1888
|
class: ThemeIcon.asClassName(removeIcon),
|
|
1889
1889
|
enabled: this.userDataProfileManagementService.getDefaultProfileToUse().id !== item.profileElement.profile.id,
|
|
1890
1890
|
id: 'deleteTrustedUri',
|
|
1891
|
-
tooltip: ( localize(
|
|
1891
|
+
tooltip: ( localize(10784, "Delete Path")),
|
|
1892
1892
|
run: () => item.profileElement.updateWorkspaces([], [item.workspace])
|
|
1893
1893
|
};
|
|
1894
1894
|
}
|
|
@@ -1903,7 +1903,7 @@ WorkspaceUriActionsColumnRenderer = WorkspaceUriActionsColumnRenderer_1 = ( __de
|
|
|
1903
1903
|
( __param(3, IUriIdentityService))
|
|
1904
1904
|
], WorkspaceUriActionsColumnRenderer));
|
|
1905
1905
|
function getHostLabel(labelService, workspaceUri) {
|
|
1906
|
-
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(
|
|
1906
|
+
return workspaceUri.authority ? labelService.getHostLabel(workspaceUri.scheme, workspaceUri.authority) : ( localize(10785, "Local"));
|
|
1907
1907
|
}
|
|
1908
1908
|
let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends EditorInput {
|
|
1909
1909
|
static { UserDataProfilesEditorInput_1 = this; }
|
|
@@ -1924,7 +1924,7 @@ let UserDataProfilesEditorInput = class UserDataProfilesEditorInput extends Edit
|
|
|
1924
1924
|
this._register(this.model.onDidChange(e => this.dirty = ( this.model.profiles.some(profile => profile instanceof NewProfileElement))));
|
|
1925
1925
|
}
|
|
1926
1926
|
get typeId() { return UserDataProfilesEditorInput_1.ID; }
|
|
1927
|
-
getName() { return localize(
|
|
1927
|
+
getName() { return localize(10786, "Profiles"); }
|
|
1928
1928
|
getIcon() { return defaultUserDataProfileIcon; }
|
|
1929
1929
|
async resolve() {
|
|
1930
1930
|
await this.model.resolve();
|
package/vscode/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditorModel.js
CHANGED
|
@@ -167,15 +167,15 @@ let AbstractUserDataProfileElement = class AbstractUserDataProfileElement extend
|
|
|
167
167
|
}
|
|
168
168
|
validate() {
|
|
169
169
|
if (!this.name) {
|
|
170
|
-
this.message = ( localize(
|
|
170
|
+
this.message = ( localize(10787, "Profile name is required and must be a non-empty value."));
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
if (this.shouldValidateName() && this.name !== this.getInitialName() && ( this.userDataProfilesService.profiles.some(p => p.name === this.name))) {
|
|
174
|
-
this.message = ( localize(
|
|
174
|
+
this.message = ( localize(10788, "Profile with name {0} already exists.", this.name));
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
177
|
if (this.flags && this.flags.settings && this.flags.keybindings && this.flags.tasks && this.flags.snippets && this.flags.extensions) {
|
|
178
|
-
this.message = ( localize(
|
|
178
|
+
this.message = ( localize(10789, "The profile should contain at least one configuration."));
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
181
|
this.message = undefined;
|
|
@@ -198,7 +198,7 @@ let AbstractUserDataProfileElement = class AbstractUserDataProfileElement extend
|
|
|
198
198
|
checkbox: undefined,
|
|
199
199
|
resourceType: r,
|
|
200
200
|
openAction: children.length
|
|
201
|
-
? ( new Action('_open', ( localize(
|
|
201
|
+
? ( new Action('_open', ( localize(10790, "Open to the Side")), ThemeIcon.asClassName(Codicon.goToFile), true, () => children[0]?.openAction?.run()))
|
|
202
202
|
: undefined
|
|
203
203
|
};
|
|
204
204
|
})));
|
|
@@ -238,7 +238,7 @@ let AbstractUserDataProfileElement = class AbstractUserDataProfileElement extend
|
|
|
238
238
|
description: isString(child.description) ? child.description : undefined,
|
|
239
239
|
resource: URI.revive(child.resourceUri),
|
|
240
240
|
icon: child.themeIcon,
|
|
241
|
-
openAction: ( new Action('_openChild', ( localize(
|
|
241
|
+
openAction: ( new Action('_openChild', ( localize(10790, "Open to the Side")), ThemeIcon.asClassName(Codicon.goToFile), true, async () => {
|
|
242
242
|
if (child.parent.type === ProfileResourceType.Extensions) {
|
|
243
243
|
await this.commandService.executeCommand('extension.open', child.handle, undefined, true, undefined, true);
|
|
244
244
|
}
|
|
@@ -400,7 +400,7 @@ let UserDataProfileElement = class UserDataProfileElement extends AbstractUserDa
|
|
|
400
400
|
const children = await this.instantiationService.createInstance(ExtensionsResourceExportTreeItem, this.profile).getChildren();
|
|
401
401
|
return (children.map(child => this.toUserDataProfileResourceChildElement(child, undefined, [{
|
|
402
402
|
id: 'applyToAllProfiles',
|
|
403
|
-
label: ( localize(
|
|
403
|
+
label: ( localize(10791, "Apply Extension to all Profiles")),
|
|
404
404
|
checked: child.applicationScoped,
|
|
405
405
|
enabled: true,
|
|
406
406
|
class: '',
|
|
@@ -531,7 +531,7 @@ let NewProfileElement = class NewProfileElement extends AbstractUserDataProfileE
|
|
|
531
531
|
}
|
|
532
532
|
if (isUserDataProfile(this.copyFrom)) {
|
|
533
533
|
if (this.defaultName === this.name) {
|
|
534
|
-
this.name = this.defaultName = ( localize(
|
|
534
|
+
this.name = this.defaultName = ( localize(10792, "{0} (Copy)", this.copyFrom.name));
|
|
535
535
|
}
|
|
536
536
|
if (this.defaultIcon === this.icon) {
|
|
537
537
|
this.icon = this.defaultIcon = this.copyFrom.icon;
|
|
@@ -545,7 +545,7 @@ let NewProfileElement = class NewProfileElement extends AbstractUserDataProfileE
|
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
547
|
if (this.defaultName === this.name) {
|
|
548
|
-
this.name = this.defaultName = ( localize(
|
|
548
|
+
this.name = this.defaultName = ( localize(10793, "Untitled"));
|
|
549
549
|
}
|
|
550
550
|
if (this.defaultIcon === this.icon) {
|
|
551
551
|
this.icon = this.defaultIcon = undefined;
|
|
@@ -777,11 +777,11 @@ let UserDataProfilesEditorModel = class UserDataProfilesEditorModel extends Edit
|
|
|
777
777
|
}
|
|
778
778
|
createProfileElement(profile) {
|
|
779
779
|
const disposables = ( new DisposableStore());
|
|
780
|
-
const activateAction = disposables.add(( new Action('userDataProfile.activate', ( localize(
|
|
781
|
-
const copyFromProfileAction = disposables.add(( new Action('userDataProfile.copyFromProfile', ( localize(
|
|
782
|
-
const exportAction = disposables.add(( new Action('userDataProfile.export', ( localize(
|
|
783
|
-
const deleteAction = disposables.add(( new Action('userDataProfile.delete', ( localize(
|
|
784
|
-
const newWindowAction = disposables.add(( new Action('userDataProfile.newWindow', ( localize(
|
|
780
|
+
const activateAction = disposables.add(( new Action('userDataProfile.activate', ( localize(10794, "Use this Profile for Current Window")), ThemeIcon.asClassName(Codicon.check), true, () => this.userDataProfileManagementService.switchProfile(profileElement.profile))));
|
|
781
|
+
const copyFromProfileAction = disposables.add(( new Action('userDataProfile.copyFromProfile', ( localize(10795, "Duplicate...")), ThemeIcon.asClassName(Codicon.copy), true, () => this.createNewProfile(profileElement.profile))));
|
|
782
|
+
const exportAction = disposables.add(( new Action('userDataProfile.export', ( localize(10796, "Export...")), ThemeIcon.asClassName(Codicon.export), true, () => this.userDataProfileImportExportService.exportProfile(profile))));
|
|
783
|
+
const deleteAction = disposables.add(( new Action('userDataProfile.delete', ( localize(10797, "Delete")), ThemeIcon.asClassName(Codicon.trash), true, () => this.removeProfile(profileElement.profile))));
|
|
784
|
+
const newWindowAction = disposables.add(( new Action('userDataProfile.newWindow', ( localize(10798, "Open New Window with this Profile")), ThemeIcon.asClassName(Codicon.emptyWindow), true, () => this.openWindow(profileElement.profile))));
|
|
785
785
|
const primaryActions = [];
|
|
786
786
|
primaryActions.push(activateAction);
|
|
787
787
|
primaryActions.push(newWindowAction);
|
|
@@ -802,11 +802,11 @@ let UserDataProfilesEditorModel = class UserDataProfilesEditorModel extends Edit
|
|
|
802
802
|
const result = await this.dialogService.confirm({
|
|
803
803
|
type: 'info',
|
|
804
804
|
message: ( localize(
|
|
805
|
-
|
|
805
|
+
10799,
|
|
806
806
|
"A new profile is already being created. Do you want to discard it and create a new one?"
|
|
807
807
|
)),
|
|
808
|
-
primaryButton: ( localize(
|
|
809
|
-
cancelButton: ( localize(
|
|
808
|
+
primaryButton: ( localize(10800, "Discard & Create")),
|
|
809
|
+
cancelButton: ( localize(10801, "Cancel"))
|
|
810
810
|
});
|
|
811
811
|
if (!result.confirmed) {
|
|
812
812
|
return;
|
|
@@ -828,24 +828,24 @@ let UserDataProfilesEditorModel = class UserDataProfilesEditorModel extends Edit
|
|
|
828
828
|
disposables.add(toDisposable(() => cancellationTokenSource.dispose(true)));
|
|
829
829
|
const primaryActions = [];
|
|
830
830
|
const secondaryActions = [];
|
|
831
|
-
const createAction = disposables.add(( new Action('userDataProfile.create', ( localize(
|
|
831
|
+
const createAction = disposables.add(( new Action('userDataProfile.create', ( localize(10802, "Create")), undefined, true, () => this.saveNewProfile(false, cancellationTokenSource.token))));
|
|
832
832
|
primaryActions.push(createAction);
|
|
833
833
|
if (isWeb && copyFrom instanceof URI && isProfileURL(copyFrom)) {
|
|
834
|
-
primaryActions.push(( new Action('userDataProfile.createInDesktop', ( localize(
|
|
834
|
+
primaryActions.push(( new Action('userDataProfile.createInDesktop', ( localize(10803, "Create in {0}", this.productService.nameLong)), undefined, true, () => this.openerService.open(copyFrom, { openExternal: true }))));
|
|
835
835
|
}
|
|
836
|
-
const cancelAction = disposables.add(( new Action('userDataProfile.cancel', ( localize(
|
|
836
|
+
const cancelAction = disposables.add(( new Action('userDataProfile.cancel', ( localize(10801, "Cancel")), ThemeIcon.asClassName(Codicon.trash), true, () => this.discardNewProfile())));
|
|
837
837
|
secondaryActions.push(cancelAction);
|
|
838
|
-
const previewProfileAction = disposables.add(( new Action('userDataProfile.preview', ( localize(
|
|
838
|
+
const previewProfileAction = disposables.add(( new Action('userDataProfile.preview', ( localize(10804, "Preview")), ThemeIcon.asClassName(Codicon.openPreview), true, () => this.previewNewProfile(cancellationTokenSource.token))));
|
|
839
839
|
secondaryActions.push(previewProfileAction);
|
|
840
|
-
const exportAction = disposables.add(( new Action('userDataProfile.export', ( localize(
|
|
841
|
-
this.newProfileElement = disposables.add(this.instantiationService.createInstance(NewProfileElement, copyFrom ? '' : ( localize(
|
|
840
|
+
const exportAction = disposables.add(( new Action('userDataProfile.export', ( localize(10796, "Export...")), ThemeIcon.asClassName(Codicon.export), isUserDataProfile(copyFrom), () => this.exportNewProfile(cancellationTokenSource.token))));
|
|
841
|
+
this.newProfileElement = disposables.add(this.instantiationService.createInstance(NewProfileElement, copyFrom ? '' : ( localize(10793, "Untitled")), copyFrom, [primaryActions, secondaryActions], [[cancelAction], [exportAction]]));
|
|
842
842
|
const updateCreateActionLabel = () => {
|
|
843
843
|
if (createAction.enabled) {
|
|
844
844
|
if (this.newProfileElement?.copyFrom && ( this.userDataProfilesService.profiles.some(p => !p.isTransient && p.name === this.newProfileElement?.name))) {
|
|
845
|
-
createAction.label = ( localize(
|
|
845
|
+
createAction.label = ( localize(10805, "Replace"));
|
|
846
846
|
}
|
|
847
847
|
else {
|
|
848
|
-
createAction.label = ( localize(
|
|
848
|
+
createAction.label = ( localize(10802, "Create"));
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
};
|
|
@@ -1000,9 +1000,9 @@ let UserDataProfilesEditorModel = class UserDataProfilesEditorModel extends Edit
|
|
|
1000
1000
|
async removeProfile(profile) {
|
|
1001
1001
|
const result = await this.dialogService.confirm({
|
|
1002
1002
|
type: 'info',
|
|
1003
|
-
message: ( localize(
|
|
1004
|
-
primaryButton: ( localize(
|
|
1005
|
-
cancelButton: ( localize(
|
|
1003
|
+
message: ( localize(10806, "Are you sure you want to delete the profile '{0}'?", profile.name)),
|
|
1004
|
+
primaryButton: ( localize(10797, "Delete")),
|
|
1005
|
+
cancelButton: ( localize(10801, "Cancel"))
|
|
1006
1006
|
});
|
|
1007
1007
|
if (result.confirmed) {
|
|
1008
1008
|
await this.userDataProfileManagementService.removeProfile(profile);
|