Show descriptions for generated commands, make them look better and sort better (#3023)

This commit is contained in:
Frank Noirot
2024-07-12 17:48:38 -04:00
committed by GitHub
parent e81b614523
commit 29bf77bb82
5 changed files with 16 additions and 8 deletions

View File

@ -514,7 +514,9 @@ export const commandBarMachine = createMachine(
)
function sortCommands(a: Command, b: Command) {
if (b.groupId === 'auth') return -1
if (a.groupId === 'auth') return 1
if (b.groupId === 'auth' && !(a.groupId === 'auth')) return -2
if (a.groupId === 'auth' && !(b.groupId === 'auth')) return 2
if (b.groupId === 'settings' && !(a.groupId === 'settings')) return -1
if (a.groupId === 'settings' && !(b.groupId === 'settings')) return 1
return a.name.localeCompare(b.name)
}