From 98fd0574936f3289138a1236926f21808cd55370 Mon Sep 17 00:00:00 2001 From: Kevin Oh Date: Wed, 14 Jun 2023 14:39:06 -0400 Subject: [PATCH] add alphabetical --- pages/user/[id].vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pages/user/[id].vue b/pages/user/[id].vue index ca6c18e55ff..a3043b6b8b2 100644 --- a/pages/user/[id].vue +++ b/pages/user/[id].vue @@ -295,6 +295,7 @@ const sortTypes = shallowReadonly([ { display: 'Follow count', name: 'follows' }, { display: 'Recently published', name: 'newest' }, { display: 'Recently updated', name: 'updated' }, + { display: 'Alphabetical', name: 'alphabetical' }, ]) const sortType = ref({ display: 'Downloads', name: 'downloads' }) @@ -363,6 +364,8 @@ const sortProjects = (a, b) => { return Date.parse(b.updated) - Date.parse(a.updated) case 'follows': return b.followers - a.followers + case 'alphabetical': + return b.title < a.title } } const projectTypes = computed(() => {