fix: small icons for recent activity, hide private repos from non-members
Some checks failed
Build and Release / Create Release (push) Has been skipped
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 1m42s
Build and Release / Lint (push) Failing after 1m59s
Build and Release / Build Binaries (amd64, darwin) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux) (push) Has been skipped
Build and Release / Build Binaries (amd64, windows) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin) (push) Has been skipped
Build and Release / Build Binaries (arm64, linux) (push) Has been skipped
Build and Release / Unit Tests (push) Successful in 2m1s
Some checks failed
Build and Release / Create Release (push) Has been skipped
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 1m42s
Build and Release / Lint (push) Failing after 1m59s
Build and Release / Build Binaries (amd64, darwin) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux) (push) Has been skipped
Build and Release / Build Binaries (amd64, windows) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin) (push) Has been skipped
Build and Release / Build Binaries (arm64, linux) (push) Has been skipped
Build and Release / Unit Tests (push) Successful in 2m1s
This commit is contained in:
parent
e871e65342
commit
1717a0c45c
@ -114,6 +114,8 @@ func home(ctx *context.Context, viewRepositories bool) {
|
||||
ctx.Data["IsOrganizationMember"] = ctx.Org.IsMember
|
||||
|
||||
// Load recently updated repositories for activity section
|
||||
// Only show private repos if user is signed in and is org member
|
||||
showPrivate := ctx.IsSigned && ctx.Org.IsMember
|
||||
recentRepos, _, err := repo_model.SearchRepository(ctx, repo_model.SearchRepoOptions{
|
||||
ListOptions: db.ListOptions{
|
||||
PageSize: 10,
|
||||
@ -121,7 +123,7 @@ func home(ctx *context.Context, viewRepositories bool) {
|
||||
},
|
||||
OwnerID: org.ID,
|
||||
OrderBy: db.SearchOrderByRecentUpdated,
|
||||
Private: ctx.IsSigned,
|
||||
Private: showPrivate,
|
||||
Actor: ctx.Doer,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@ -165,7 +165,7 @@
|
||||
<div class="item">
|
||||
<div class="tw-flex tw-items-center tw-gap-3">
|
||||
{{if .Repo.Avatar}}
|
||||
<img class="tw-max-w-20 tw-max-h-20 tw-rounded tw-object-contain" src="{{.Repo.RelAvatarLink ctx}}" alt="">
|
||||
<img class="tw-w-8 tw-h-8 tw-rounded" src="{{.Repo.RelAvatarLink ctx}}" alt="">
|
||||
{{else}}
|
||||
<div class="tw-w-8 tw-h-8 tw-flex tw-items-center tw-justify-center">
|
||||
{{if .Repo.IsPrivate}}{{svg "octicon-lock" 20}}{{else if .Repo.IsFork}}{{svg "octicon-repo-forked" 20}}{{else if .Repo.IsMirror}}{{svg "octicon-mirror" 20}}{{else}}{{svg "octicon-repo" 20}}{{end}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user