Show descriptions for generated commands, make them look better and sort better (#3023)
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user