From 36d4d200a95e819ddf691483817e807968103855 Mon Sep 17 00:00:00 2001 From: wea_ondara Date: Wed, 27 Sep 2023 17:42:12 +0200 Subject: [PATCH] sort manga tables order by most relevant first --- src/components/MangaLists.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/MangaLists.vue b/src/components/MangaLists.vue index 2078da4..2e5b2a6 100644 --- a/src/components/MangaLists.vue +++ b/src/components/MangaLists.vue @@ -38,6 +38,7 @@ export default class MangaLists extends Vue { } get viewLists(): ViewList[] { + const order = ['reading', 'paused', 'planning', 'completed', 'dropped']; const lists = this.mangaStore.aniListLists; const manga = this.mangaStore.aniListManga; @@ -56,7 +57,8 @@ export default class MangaLists extends Vue { chapters: chapters, } as ViewEntry); }), - })); + })) + .sort((l, r) => order.indexOf(l.list.name.toLowerCase()) - order.indexOf(r.list.name.toLowerCase())); } }