Fix and improve dashboard repo UI (#2285)

* Fix and improve dashboard repo UI

* Change order of scripts loading

* Remove "mirror" tab

* Remove single tab panel for "org user"

* Add localization strings

* Create vue component and change event for search

* Add "mirrors" filter
This commit is contained in:
Morlinest 2017-08-17 03:31:34 +02:00 committed by Lunny Xiao
parent 722bcefbbf
commit 951fb572a7
10 changed files with 205 additions and 121 deletions

View file

@ -5,6 +5,7 @@
package repo
import (
"fmt"
"strings"
api "code.gitea.io/sdk/gitea"
@ -91,6 +92,7 @@ func Search(ctx *context.APIContext) {
}
ctx.SetLinkHeader(int(count), setting.API.MaxResponseItems)
ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", count))
ctx.JSON(200, api.SearchResults{
OK: true,
Data: results,

View file

@ -131,6 +131,7 @@ func Dashboard(ctx *context.Context) {
ctx.Data["Title"] = ctxUser.DisplayName() + " - " + ctx.Tr("dashboard")
ctx.Data["PageIsDashboard"] = true
ctx.Data["PageIsNews"] = true
ctx.Data["SearchLimit"] = setting.UI.User.RepoPagingNum
// Only user can have collaborative repositories.
if !ctxUser.IsOrganization() {