mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-22 04:19:54 +00:00
sort profiles by groups - fixes #4163
This commit is contained in:
parent
6df8707b6d
commit
46e0035327
@ -43,8 +43,8 @@ export class ProfilesService {
|
||||
...this.config.store.profiles ?? [],
|
||||
...list,
|
||||
]
|
||||
list.sort((a, b) => a.group?.localeCompare(b.group ?? '') ?? -1)
|
||||
list.sort((a, b) => a.name.localeCompare(b.name))
|
||||
const sortKey = p => `${p.group ?? ''} / ${p.name}`
|
||||
list.sort((a, b) => sortKey(a).localeCompare(sortKey(b)))
|
||||
list.sort((a, b) => (a.isBuiltin ? 1 : 0) - (b.isBuiltin ? 1 : 0))
|
||||
return list
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user