提交 af39a4d4 编写于 作者: R Rachel Macfarlane

Expose command to open settings page with online services query from gear menu...

Expose command to open settings page with online services query from gear menu and preferences menu, fixes #75215
上级 94b23bc6
......@@ -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(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册