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 20, 2023
1 parent db1ebd7 commit 773956a
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 773956a

Please sign in to comment.