diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2021-10-15 10:35:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 10:35:26 +0800 |
commit | 56362043d35d2542c6fe4ac7c0ac5aabb833a9ed (patch) | |
tree | d3dd12505e7dd1b2d854c61384e1088f6901bab6 /routers | |
parent | 96ff3e310f0ba1e94f4e8206758b583719a9b46c (diff) | |
download | gitea-56362043d35d2542c6fe4ac7c0ac5aabb833a9ed.tar.gz gitea-56362043d35d2542c6fe4ac7c0ac5aabb833a9ed.zip |
Frontend refactor: move Vue related code from `index.js` to `components` dir, and remove unused codes. (#17301)
* frontend refactor
* Apply suggestions from code review
Co-authored-by: delvh <dev.lh@web.de>
* Update templates/base/head.tmpl
Co-authored-by: delvh <dev.lh@web.de>
* Update docs/content/doc/developers/guidelines-frontend.md
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* fix typo
* fix typo
* refactor PageData to pageData
* Apply suggestions from code review
Co-authored-by: delvh <dev.lh@web.de>
* Simply for the visual difference.
Co-authored-by: delvh <dev.lh@web.de>
* Revert "Apply suggestions from code review"
This reverts commit 4d78ad9b0e96ca180e0823de17659a2e0814c099.
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/activity.go | 2 | ||||
-rw-r--r-- | routers/web/user/home.go | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/routers/web/repo/activity.go b/routers/web/repo/activity.go index dcb7bf57cd..f9d248b06e 100644 --- a/routers/web/repo/activity.go +++ b/routers/web/repo/activity.go @@ -60,7 +60,7 @@ func Activity(ctx *context.Context) { return } - if ctx.Data["ActivityTopAuthors"], err = models.GetActivityStatsTopAuthors(ctx.Repo.Repository, timeFrom, 10); err != nil { + if ctx.PageData["repoActivityTopAuthors"], err = models.GetActivityStatsTopAuthors(ctx.Repo.Repository, timeFrom, 10); err != nil { ctx.ServerError("GetActivityStatsTopAuthors", err) return } diff --git a/routers/web/user/home.go b/routers/web/user/home.go index 2f1fca4527..d2b67e6e59 100644 --- a/routers/web/user/home.go +++ b/routers/web/user/home.go @@ -106,7 +106,10 @@ 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 + + ctx.PageData["dashboardRepoList"] = map[string]interface{}{ + "searchLimit": setting.UI.User.RepoPagingNum, + } if setting.Service.EnableUserHeatmap { data, err := models.GetUserHeatmapDataByUserTeam(ctxUser, ctx.Org.Team, ctx.User) |