summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorAllen Wild <aswild@users.noreply.github.com>2019-02-19 03:25:28 -0500
committerLauris BH <lauris@nix.lv>2019-02-19 10:25:28 +0200
commitff2be17e3f2e4cf8e756796574cdd72d349fa19b (patch)
tree8bcfdac1e1e8097ecfedc5fd5f58b78883c88327 /public
parentf5fa22a49997cb423255e98da5abd67c2115f2c0 (diff)
downloadgitea-ff2be17e3f2e4cf8e756796574cdd72d349fa19b.tar.gz
gitea-ff2be17e3f2e4cf8e756796574cdd72d349fa19b.zip
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.
Diffstat (limited to 'public')
-rw-r--r--public/js/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 5810647296..e97b43430a 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -2171,7 +2171,9 @@ function initVueComponents(){
return this.repos.length > 0 && this.repos.length < this.repoTypes[this.reposFilter].count;
},
searchURL: function() {
- 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' : '');
+ return this.suburl + '/api/v1/repos/search?sort=updated&order=desc&uid=' + this.uid + '&q=' + this.searchQuery
+ + '&limit=' + this.searchLimit + '&mode=' + this.repoTypes[this.reposFilter].searchMode
+ + (this.reposFilter !== 'all' ? '&exclusive=1' : '');
},
repoTypeCount: function() {
return this.repoTypes[this.reposFilter].count;