1
0
mirror of https://github.com/Eugeny/tabby.git synced 2025-07-27 09:08:35 +00:00

feat[core): order recent profile

This commit is contained in:
Clem Fern
2023-07-20 20:07:55 +02:00
parent 0101ffddb6
commit 4dedbbc25a

@@ -118,12 +118,12 @@ export class ProfilesService {
try { try {
const recentProfiles = this.getRecentProfiles() const recentProfiles = this.getRecentProfiles()
let options: SelectorOption<void>[] = recentProfiles.map(p => ({ let options: SelectorOption<void>[] = recentProfiles.map((p, i) => ({
...this.selectorOptionForProfile(p), ...this.selectorOptionForProfile(p),
group: this.translate.instant('Recent'), group: this.translate.instant('Recent'),
icon: 'fas fa-history', icon: 'fas fa-history',
color: p.color, color: p.color,
weight: -2, weight: i - (recentProfiles.length + 1),
callback: async () => { callback: async () => {
if (p.id) { if (p.id) {
p = (await this.getProfiles()).find(x => x.id === p.id) ?? p p = (await this.getProfiles()).find(x => x.id === p.id) ?? p