mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-09 05:50:08 +00:00
feat[core): Eugeny/tabby#7057 order recent profile
This commit is contained in:
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user