Skip to content

Commit b1aa34a

Browse files
committed
remove PageIsWatchers and PageIsStargazers because not used
1 parent 09aac88 commit b1aa34a

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

routers/web/repo/view.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,6 @@ func RenderUserCards(ctx *context.Context, total int, getter func(opts db.ListOp
11261126
func Watchers(ctx *context.Context) {
11271127
ctx.Data["Title"] = ctx.Tr("repo.watchers")
11281128
ctx.Data["CardsTitle"] = ctx.Tr("repo.watchers")
1129-
ctx.Data["PageIsWatchers"] = true
1130-
11311129
RenderUserCards(ctx, ctx.Repo.Repository.NumWatches, func(opts db.ListOptions) ([]*user_model.User, error) {
11321130
return repo_model.GetRepoWatchers(ctx, ctx.Repo.Repository.ID, opts)
11331131
}, tplWatchers)
@@ -1137,7 +1135,6 @@ func Watchers(ctx *context.Context) {
11371135
func Stars(ctx *context.Context) {
11381136
ctx.Data["Title"] = ctx.Tr("repo.stargazers")
11391137
ctx.Data["CardsTitle"] = ctx.Tr("repo.stargazers")
1140-
ctx.Data["PageIsStargazers"] = true
11411138
RenderUserCards(ctx, ctx.Repo.Repository.NumStars, func(opts db.ListOptions) ([]*user_model.User, error) {
11421139
return repo_model.GetStargazers(ctx, ctx.Repo.Repository, opts)
11431140
}, tplWatchers)

templates/repo/user_cards.tmpl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ At the moment, no JS initialization would re-trigger (fortunately there is no JS
66
-->
77
<div class="no-loading-indicator tw-hidden"></div>
88
<div class="user-cards"
9-
hx-trigger="refreshUserCards from:body"
10-
hx-indicator=".no-loading-indicator"
11-
hx-get="{{$.CurrentURL}}"
12-
hx-swap="outerHTML" hx-select=".user-cards"
9+
hx-trigger="refreshUserCards from:body" hx-indicator=".no-loading-indicator"
10+
hx-get="{{$.CurrentURL}}" hx-swap="outerHTML" hx-select=".user-cards"
1311
>
1412
{{if .CardsTitle}}
1513
<h2 class="ui dividing header">

0 commit comments

Comments
 (0)