mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-23 21:09:52 +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 ?? [],
|
...this.config.store.profiles ?? [],
|
||||||
...list,
|
...list,
|
||||||
]
|
]
|
||||||
list.sort((a, b) => a.group?.localeCompare(b.group ?? '') ?? -1)
|
const sortKey = p => `${p.group ?? ''} / ${p.name}`
|
||||||
list.sort((a, b) => a.name.localeCompare(b.name))
|
list.sort((a, b) => sortKey(a).localeCompare(sortKey(b)))
|
||||||
list.sort((a, b) => (a.isBuiltin ? 1 : 0) - (b.isBuiltin ? 1 : 0))
|
list.sort((a, b) => (a.isBuiltin ? 1 : 0) - (b.isBuiltin ? 1 : 0))
|
||||||
return list
|
return list
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user