Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
add alphabetical
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsine committed Jun 14, 2023
1 parent d9b76c2 commit 98fd057
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pages/user/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
Expand Down Expand Up @@ -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(() => {
Expand Down

0 comments on commit 98fd057

Please sign in to comment.