From 71ff656356833bed88000fb5a775b7a93204e88c Mon Sep 17 00:00:00 2001 From: "m.huber" Date: Tue, 30 Apr 2024 03:26:04 +0200 Subject: [PATCH 1/3] Use alphabetic sort for repo list at Dashboard --- web_src/js/components/DashboardRepoList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue index 2d980a1b180a..3ceb9c614253 100644 --- a/web_src/js/components/DashboardRepoList.vue +++ b/web_src/js/components/DashboardRepoList.vue @@ -76,7 +76,7 @@ const sfc = { return this.repos.length > 0 && this.repos.length < this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`]; }, searchURL() { - return `${this.subUrl}/repo/search?sort=updated&order=desc&uid=${this.uid}&team_id=${this.teamId}&q=${this.searchQuery + return `${this.subUrl}/repo/search?sort=alpha&order=desc&uid=${this.uid}&team_id=${this.teamId}&q=${this.searchQuery }&page=${this.page}&limit=${this.searchLimit}&mode=${this.repoTypes[this.reposFilter].searchMode }${this.reposFilter !== 'all' ? '&exclusive=1' : '' }${this.archivedFilter === 'archived' ? '&archived=true' : ''}${this.archivedFilter === 'unarchived' ? '&archived=false' : '' From 161a97ac13e64a1543713f29094848a18284f3e2 Mon Sep 17 00:00:00 2001 From: "m.huber" Date: Tue, 30 Apr 2024 03:39:38 +0200 Subject: [PATCH 2/3] RepoOrderBy-respect-owner-too --- models/repo/search.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/repo/search.go b/models/repo/search.go index 4d64acf8cfe3..54d6dcfb440c 100644 --- a/models/repo/search.go +++ b/models/repo/search.go @@ -8,14 +8,14 @@ import "code.gitea.io/gitea/models/db" // SearchOrderByMap represents all possible search order var SearchOrderByMap = map[string]map[string]db.SearchOrderBy{ "asc": { - "alpha": db.SearchOrderByAlphabetically, + "alpha": "owner_name ASC, name ASC", "created": db.SearchOrderByOldest, "updated": db.SearchOrderByLeastUpdated, "size": db.SearchOrderBySize, "id": db.SearchOrderByID, }, "desc": { - "alpha": db.SearchOrderByAlphabeticallyReverse, + "alpha": "owner_name DESC, name DESC", "created": db.SearchOrderByNewest, "updated": db.SearchOrderByRecentUpdated, "size": db.SearchOrderBySizeReverse, From e0ee13e27a538ed127bd83daec8f5b36ab17f5e6 Mon Sep 17 00:00:00 2001 From: "m.huber" Date: Tue, 30 Apr 2024 03:40:17 +0200 Subject: [PATCH 3/3] sort alpha asc --- web_src/js/components/DashboardRepoList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue index 3ceb9c614253..8f5ca6e18cb2 100644 --- a/web_src/js/components/DashboardRepoList.vue +++ b/web_src/js/components/DashboardRepoList.vue @@ -76,7 +76,7 @@ const sfc = { return this.repos.length > 0 && this.repos.length < this.counts[`${this.reposFilter}:${this.archivedFilter}:${this.privateFilter}`]; }, searchURL() { - return `${this.subUrl}/repo/search?sort=alpha&order=desc&uid=${this.uid}&team_id=${this.teamId}&q=${this.searchQuery + return `${this.subUrl}/repo/search?sort=alpha&order=asc&uid=${this.uid}&team_id=${this.teamId}&q=${this.searchQuery }&page=${this.page}&limit=${this.searchLimit}&mode=${this.repoTypes[this.reposFilter].searchMode }${this.reposFilter !== 'all' ? '&exclusive=1' : '' }${this.archivedFilter === 'archived' ? '&archived=true' : ''}${this.archivedFilter === 'unarchived' ? '&archived=false' : ''