sort manga tables order by most relevant first

This commit is contained in:
wea_ondara
2023-09-27 17:42:12 +02:00
parent 544c035d84
commit 36d4d200a9

View File

@@ -38,6 +38,7 @@ export default class MangaLists extends Vue {
} }
get viewLists(): ViewList[] { get viewLists(): ViewList[] {
const order = ['reading', 'paused', 'planning', 'completed', 'dropped'];
const lists = this.mangaStore.aniListLists; const lists = this.mangaStore.aniListLists;
const manga = this.mangaStore.aniListManga; const manga = this.mangaStore.aniListManga;
@@ -56,7 +57,8 @@ export default class MangaLists extends Vue {
chapters: chapters, chapters: chapters,
} as ViewEntry); } as ViewEntry);
}), }),
})); }))
.sort((l, r) => order.indexOf(l.list.name.toLowerCase()) - order.indexOf(r.list.name.toLowerCase()));
} }
} }
</script> </script>