From 11d6cb1b89ded5be1c865c745d378f5fa1e5afac Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Tue, 18 May 2021 15:23:48 +0800 Subject: [PATCH] mod dashboard --- routers/user/home.go | 2 +- routers/user/profile.go | 2 + templates/base/head_navbar.tmpl | 8 +- templates/explore/repo_list.tmpl | 243 ++++++++++++++++----------------------- 4 files changed, 105 insertions(+), 150 deletions(-) mode change 100644 => 100755 routers/user/home.go mode change 100644 => 100755 routers/user/profile.go diff --git a/routers/user/home.go b/routers/user/home.go old mode 100644 new mode 100755 index 2fc0c60aa..9421ee7d1 --- a/routers/user/home.go +++ b/routers/user/home.go @@ -156,7 +156,7 @@ func Dashboard(ctx *context.Context) { 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 old mode 100644 new mode 100755 index 0e29b6117..0fcc6453a --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -261,6 +261,8 @@ 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 1eada0a01..fd6634a7d 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,13 +109,9 @@
- - {{svg "octicon-info" 16}} - {{.i18n.Tr "your_dashboard"}} - {{svg "octicon-person" 16}} - {{.i18n.Tr "your_profile"}} + {{.i18n.Tr "your_dashboard"}} {{svg "octicon-star" 16}} diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index f6463f20a..89be6fc74 100755 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -1,31 +1,9 @@