diff --git a/modules/structs/repo.go b/modules/structs/repo.go old mode 100644 new mode 100755 index 07be4aec24..70de9b7469 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -5,7 +5,6 @@ package structs import ( - "html/template" "time" ) @@ -76,7 +75,6 @@ type Repository struct { Created time.Time `json:"created_at"` // swagger:strfmt date-time Updated time.Time `json:"updated_at"` - TimeSinceUnixUpdatedHtml template.HTML `json:"timeSinceUnixUpdatedHtml"` Permissions *Permission `json:"permissions,omitempty"` HasIssues bool `json:"has_issues"` InternalTracker *InternalTracker `json:"internal_tracker,omitempty"` @@ -90,8 +88,6 @@ type Repository struct { AllowRebaseMerge bool `json:"allow_rebase_explicit"` AllowSquash bool `json:"allow_squash_merge"` AvatarURL string `json:"avatar_url"` - PrimaryLanguage string `json:"primaryLanguage"` - PrimaryLanguageColor string `json:"primaryLanguageColor"` } // CreateRepoOption options when creating repository diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go old mode 100644 new mode 100755 index a0ea2166f3..a724ebcc37 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -16,7 +16,6 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/validation" "code.gitea.io/gitea/routers/api/v1/utils" @@ -200,7 +199,6 @@ func Search(ctx *context.APIContext) { } results := make([]*api.Repository, len(repos)) - for i, repo := range repos { if err = repo.GetOwner(); err != nil { ctx.JSON(http.StatusInternalServerError, api.SearchError{ @@ -217,11 +215,6 @@ func Search(ctx *context.APIContext) { }) } results[i] = repo.APIFormat(accessMode) - results[i].TimeSinceUnixUpdatedHtml = timeutil.TimeSinceUnix(repo.UpdatedUnix, ctx.Language()) - if repo.PrimaryLanguage != nil { - results[i].PrimaryLanguage = repo.PrimaryLanguage.Language - results[i].PrimaryLanguageColor = repo.PrimaryLanguage.Color - } } ctx.SetLinkHeader(int(count), opts.PageSize) diff --git a/routers/user/home.go b/routers/user/home.go index 7d1f247eaa..2fc0c60aad 100755 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -145,18 +145,18 @@ func Dashboard(ctx *context.Context) { ctx.Data["MirrorCount"] = len(mirrors) ctx.Data["Mirrors"] = mirrors - //retrieveFeeds(ctx, models.GetFeedsOptions{ - // RequestedUser: ctxUser, - // Actor: ctx.User, - // IncludePrivate: true, - // OnlyPerformedBy: false, - // IncludeDeleted: false, - //}) + retrieveFeeds(ctx, models.GetFeedsOptions{ + RequestedUser: ctxUser, + Actor: ctx.User, + IncludePrivate: true, + OnlyPerformedBy: false, + IncludeDeleted: false, + }) if ctx.Written() { return } - //ctx.HTML(200, tplDashboard) + ctx.HTML(200, tplDashboard) } // Milestones render the user milestones page diff --git a/routers/user/profile.go b/routers/user/profile.go index 063b269148..0e29b61174 100755 --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -178,17 +178,10 @@ func Profile(ctx *context.Context) { total = ctxUser.NumFollowing case "activity": - typeQuery := ctx.Query("type") - ctx.Data["ActTabName"] = typeQuery - onlyPerformedBy := true - if typeQuery == "all" { - onlyPerformedBy = false - } - retrieveFeeds(ctx, models.GetFeedsOptions{RequestedUser: ctxUser, Actor: ctx.User, IncludePrivate: showPrivate, - OnlyPerformedBy: onlyPerformedBy, + OnlyPerformedBy: true, IncludeDeleted: false, }) if ctx.Written() { @@ -268,8 +261,6 @@ func Profile(ctx *context.Context) { ctx.Data["ShowUserEmail"] = len(ctxUser.Email) > 0 && ctx.IsSigned && (!ctxUser.KeepEmailPrivate || ctxUser.ID == ctx.User.ID) - Dashboard(ctx) - ctx.HTML(200, tplProfile) } diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index fd6634a7d1..1eada0a01b 100755 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -9,7 +9,7 @@ {{if .IsSigned}} - {{.i18n.Tr "dashboard"}} + {{.i18n.Tr "dashboard"}} {{.i18n.Tr "custom.head.openi"}} {{if not .UnitIssuesGlobalDisabled}} {{.i18n.Tr "issues"}} @@ -109,9 +109,13 @@
+ + {{svg "octicon-info" 16}} + {{.i18n.Tr "your_dashboard"}} + {{svg "octicon-person" 16}} - {{.i18n.Tr "your_dashboard"}} + {{.i18n.Tr "your_profile"}} {{svg "octicon-star" 16}} diff --git a/templates/user/dashboard/repo_list_dashboard.tmpl b/templates/user/dashboard/repo_list_dashboard.tmpl deleted file mode 100755 index a4fa2e5905..0000000000 --- a/templates/user/dashboard/repo_list_dashboard.tmpl +++ /dev/null @@ -1,130 +0,0 @@ -${repo.description}
-{{$.i18n.Tr "org.repo_updated"}} -
-