diff --git a/src/commands.ts b/src/commands.ts index 9572811..8c454c4 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -82,7 +82,7 @@ export function addCommands( return settings.composite .starredSection as ISettingsLayout['starredSection']; }, - label: trans.__('Show starred section'), + label: trans.__('Show Starred Section'), execute: async () => { const starredSection = settings.composite .starredSection as ISettingsLayout['starredSection']; @@ -95,11 +95,19 @@ export function addCommands( return settings.composite .searchAllSections as ISettingsLayout['searchAllSections']; }, - label: trans.__('Search in all sections'), + label: trans.__('Search in All Sections'), execute: async () => { const searchAllSections = settings.composite .searchAllSections as ISettingsLayout['searchAllSections']; await settings.set('searchAllSections', !searchAllSections); } }); + app.commands.addCommand(CommandIDs.openSettings, { + label: trans.__('Open Settings Editor'), + execute: () => { + app.commands.execute('settingeditor:open', { + query: 'New Launcher' + }); + } + }); } diff --git a/src/components/quick-settings.tsx b/src/components/quick-settings.tsx index 67070f9..3a25d9d 100644 --- a/src/components/quick-settings.tsx +++ b/src/components/quick-settings.tsx @@ -14,10 +14,7 @@ export function QuickSettings(props: { const menu = new MenuSvg({ commands: commands }); menu.addItem({ command: CommandIDs.showStarred, args: {} }); menu.addItem({ command: CommandIDs.searchAllSections, args: {} }); - menu.addItem({ - command: 'settingeditor:open', - args: { query: 'New Launcher' } - }); + menu.addItem({ command: CommandIDs.openSettings, args: {} }); const iconRef = React.useRef(null); diff --git a/src/types.ts b/src/types.ts index 8824ddf..6e062a7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -16,6 +16,7 @@ export namespace CommandIDs { export const toggleColumn = 'new-launcher:table-toggle-column'; export const showStarred = 'new-launcher:show-starred'; export const searchAllSections = 'new-launcher:search-all-sections'; + export const openSettings = 'new-launcher:open-settings'; } export interface ISettingsLayout {