diff --git a/routers/web/org/home.go b/routers/web/org/home.go index 1e04b72cbb..1fa732a715 100644 --- a/routers/web/org/home.go +++ b/routers/web/org/home.go @@ -70,6 +70,10 @@ func Home(ctx *context.Context) { orderBy = db.SearchOrderByForksReverse case "fewestforks": orderBy = db.SearchOrderByForks + case "size": + orderBy = db.SearchOrderByGitSize + case "reversesize": + orderBy = db.SearchOrderByGitSizeReverse default: ctx.Data["SortType"] = "recentupdate" orderBy = db.SearchOrderByRecentUpdated diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 3f91233ee6..b33a814b91 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -132,6 +132,10 @@ func prepareUserProfileTabData(ctx *context.Context, showPrivate bool, profileDb orderBy = db.SearchOrderByForksReverse case "fewestforks": orderBy = db.SearchOrderByForks + case "size": + orderBy = db.SearchOrderByGitSize + case "reversesize": + orderBy = db.SearchOrderByGitSizeReverse default: ctx.Data["SortType"] = "recentupdate" orderBy = db.SearchOrderByRecentUpdated