mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
Expose command to open settings page with online services query from gear menu and preferences menu, fixes #75215
This commit is contained in:
parent
94b23bc6c4
commit
af39a4d4fb
|
@ -307,7 +307,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|||
id: VIEWLET_ID,
|
||||
title: localize({ key: 'miPreferencesExtensions', comment: ['&& denotes a mnemonic'] }, "&&Extensions")
|
||||
},
|
||||
order: 2
|
||||
order: 3
|
||||
});
|
||||
|
||||
// View menu
|
||||
|
|
|
@ -741,6 +741,8 @@ CommandsRegistry.registerCommand(SETTINGS_EDITOR_COMMAND_FILTER_ONLINE, serviceA
|
|||
const control = serviceAccessor.get(IEditorService).activeControl as SettingsEditor2;
|
||||
if (control instanceof SettingsEditor2) {
|
||||
control.focusSearch(`@tag:usesOnlineServices`);
|
||||
} else {
|
||||
serviceAccessor.get(IPreferencesService).openSettings(undefined, '@tag:usesOnlineServices');
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -755,6 +757,15 @@ MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
|||
order: 1
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
group: '1_settings',
|
||||
command: {
|
||||
id: SETTINGS_EDITOR_COMMAND_FILTER_ONLINE,
|
||||
title: nls.localize({ key: 'miOpenOnlineSettings', comment: ['&& denotes a mnemonic'] }, "&&Online Services Settings")
|
||||
},
|
||||
order: 2
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
group: '2_keybindings',
|
||||
command: {
|
||||
|
|
|
@ -232,6 +232,7 @@ export class UpdateContribution extends Disposable implements IGlobalActivity {
|
|||
private static readonly selectColorThemeId = 'workbench.action.selectTheme';
|
||||
private static readonly selectIconThemeId = 'workbench.action.selectIconTheme';
|
||||
private static readonly showExtensionsId = 'workbench.view.extensions';
|
||||
private static readonly showOnlineSettingsId = 'settings.filterByOnline';
|
||||
|
||||
get id() { return 'vs.update'; }
|
||||
get name() { return nls.localize('manage', "Manage"); }
|
||||
|
@ -476,6 +477,7 @@ export class UpdateContribution extends Disposable implements IGlobalActivity {
|
|||
new CommandAction(UpdateContribution.showCommandsId, nls.localize('commandPalette', "Command Palette..."), this.commandService),
|
||||
new Separator(),
|
||||
new CommandAction(UpdateContribution.openSettingsId, nls.localize('settings', "Settings"), this.commandService),
|
||||
new CommandAction(UpdateContribution.showOnlineSettingsId, nls.localize('onlineServices', "Online Services Settings"), this.commandService),
|
||||
new CommandAction(UpdateContribution.showExtensionsId, nls.localize('showExtensions', "Extensions"), this.commandService),
|
||||
new CommandAction(UpdateContribution.openKeybindingsId, nls.localize('keyboardShortcuts', "Keyboard Shortcuts"), this.commandService),
|
||||
new Separator(),
|
||||
|
|
Loading…
Reference in a new issue