mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 20:37:57 +02:00
feat(command_palette): sort commands by name
This commit is contained in:
@@ -169,7 +169,12 @@ class CommandRegistry {
|
||||
}
|
||||
|
||||
getAllCommands(): CommandDefinition[] {
|
||||
return Array.from(this.commands.values());
|
||||
const commands = Array.from(this.commands.values());
|
||||
|
||||
// Sort commands by name
|
||||
commands.sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
return commands;
|
||||
}
|
||||
|
||||
searchCommands(query: string): CommandDefinition[] {
|
||||
|
||||
Reference in New Issue
Block a user