Skip to content

Commit ff2be17

Browse files
aswildlafriks
authored andcommitted
dashboard: sort Repositories widget by most recently updated (issue #3963) (#4599)
Similar to Github and other git hosting sites, sort the user's repos on the dashboard by last updated rather than alphabetically. An alphabetic sort isn't very useful once a user has more than 15 repos and wants quick access to recent ones that aren't in the first part of the alphabet.
1 parent f5fa22a commit ff2be17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

public/js/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2171,7 +2171,9 @@ function initVueComponents(){
21712171
return this.repos.length > 0 && this.repos.length < this.repoTypes[this.reposFilter].count;
21722172
},
21732173
searchURL: function() {
2174-
return this.suburl + '/api/v1/repos/search?uid=' + this.uid + '&q=' + this.searchQuery + '&limit=' + this.searchLimit + '&mode=' + this.repoTypes[this.reposFilter].searchMode + (this.reposFilter !== 'all' ? '&exclusive=1' : '');
2174+
return this.suburl + '/api/v1/repos/search?sort=updated&order=desc&uid=' + this.uid + '&q=' + this.searchQuery
2175+
+ '&limit=' + this.searchLimit + '&mode=' + this.repoTypes[this.reposFilter].searchMode
2176+
+ (this.reposFilter !== 'all' ? '&exclusive=1' : '');
21752177
},
21762178
repoTypeCount: function() {
21772179
return this.repoTypes[this.reposFilter].count;

0 commit comments

Comments
 (0)