diff options
author | zeripath <art27@cantab.net> | 2021-10-19 05:38:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-19 12:38:33 +0800 |
commit | e2a59c57fc1dcaecddc8d8dbf27d551c92dda101 (patch) | |
tree | 2d8fa8d96aead356a4bb5f4fbdd1637283752543 /routers | |
parent | 1f41fcc342d35f58969c0777be2feaa610c1c267 (diff) | |
download | gitea-e2a59c57fc1dcaecddc8d8dbf27d551c92dda101.tar.gz gitea-e2a59c57fc1dcaecddc8d8dbf27d551c92dda101.zip |
Fix dashboard repolist alignment and repolisting (#17355)
Unfortunately #17301 broke the restriction of the dashboard repolist to
the user's repos because it stopped passing in the uid for the current
user. This PR restores this.
There is also a weird alignment problem - not caused by that PR - where
the menu items in the repolist spread over multiple lines. This PR
simply reduces the padding on these items and switches the justification
of the flex elements to space-evenly.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/user/home.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/web/user/home.go b/routers/web/user/home.go index 959b1aa1e9..af5750e616 100644 --- a/routers/web/user/home.go +++ b/routers/web/user/home.go @@ -72,8 +72,14 @@ func Dashboard(ctx *context.Context) { ctx.Data["PageIsDashboard"] = true ctx.Data["PageIsNews"] = true + var uid int64 + if ctxUser != nil { + uid = ctxUser.ID + } + ctx.PageData["dashboardRepoList"] = map[string]interface{}{ "searchLimit": setting.UI.User.RepoPagingNum, + "uid": uid, } if setting.Service.EnableUserHeatmap { |