From c971b893bf0c2bb9c17174211dfe1c8cbb8adea0 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Thu, 2 Dec 2021 11:15:04 +0800 Subject: [PATCH 1/4] mod default --- routers/user/profile.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/routers/user/profile.go b/routers/user/profile.go index 0e29b6117..fe5dc4598 100755 --- a/routers/user/profile.go +++ b/routers/user/profile.go @@ -6,6 +6,7 @@ package user import ( + "errors" "fmt" "path" "strings" @@ -107,6 +108,9 @@ func Profile(ctx *context.Context) { ctx.Data["HasOrgsVisible"] = models.HasOrgsVisible(orgs, ctx.User) tab := ctx.Query("tab") + if tab == "" { + tab = "activity" + } ctx.Data["TabName"] = tab page := ctx.QueryInt("page") @@ -230,7 +234,7 @@ func Profile(ctx *context.Context) { } total = int(count) ctx.Data["Datasets"] = datasets - default: + case "repository": repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ ListOptions: models.ListOptions{ PageSize: setting.UI.User.RepoPagingNum, @@ -251,6 +255,9 @@ func Profile(ctx *context.Context) { } total = int(count) + default: + ctx.ServerError("tab error", errors.New("tab error")) + return } ctx.Data["Repos"] = repos ctx.Data["Total"] = total From 2c186d6bed90d6aee1a7f83da0086b9c747bedbe Mon Sep 17 00:00:00 2001 From: Gitea Date: Fri, 3 Dec 2021 17:06:06 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B4=BB=E8=B7=83=E5=BA=A6=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/user/profile.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 58f6cc471..70dd8c100 100755 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -83,7 +83,11 @@
+
+
    +
  • +
        +
      • +
      +
      @@ -87,7 +94,7 @@ {{svg "octicon-repo" 16}} {{.i18n.Tr "user.repositories"}} --> - + {{svg "octicon-repo" 16}} {{.i18n.Tr "user.repositories"}} From b423801ea182bb0cee64d363ef1d60cd8589b684 Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 8 Dec 2021 15:18:23 +0800 Subject: [PATCH 4/4] =?UTF-8?q?#597=20=E5=A2=9E=E5=8A=A0=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/img/member.svg | 1 + public/img/pro_num.svg | 1 + templates/user/profile.tmpl | 64 +++++++++++++++++++++++++++++++++++++-------- 3 files changed, 55 insertions(+), 11 deletions(-) create mode 100644 public/img/member.svg create mode 100644 public/img/pro_num.svg diff --git a/public/img/member.svg b/public/img/member.svg new file mode 100644 index 000000000..5e91d1c67 --- /dev/null +++ b/public/img/member.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/pro_num.svg b/public/img/pro_num.svg new file mode 100644 index 000000000..f6d5ae7d6 --- /dev/null +++ b/public/img/pro_num.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 74ba737ba..ce8cb54f6 100755 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -50,16 +50,46 @@ {{end}}
    • {{svg "octicon-clock" 16}} {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}}
    • {{if and .Orgs .HasOrgsVisible}} -
    • -
    • -
      - -
      @@ -155,3 +178,22 @@
      {{template "base/footer" .}} + + \ No newline at end of file