Skip to content

Commit 2c5aaa5

Browse files
Apply suggestions from code review
Co-authored-by: John Olheiser <[email protected]>
1 parent 1be0880 commit 2c5aaa5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

routers/web/repo/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ func Action(ctx *context.Context) {
343343
case "watch", "unwatch":
344344
ctx.Data["IsWatchingRepo"] = repo_model.IsWatching(ctx, ctx.Doer.ID, ctx.Repo.Repository.ID)
345345
case "star", "unstar":
346-
ctx.Data["IsStaringRepo"] = repo_model.IsStaring(ctx, ctx.Doer.ID, ctx.Repo.Repository.ID)
346+
ctx.Data["IsStarringRepo"] = repo_model.IsStaring(ctx, ctx.Doer.ID, ctx.Repo.Repository.ID)
347347
}
348348

349349
switch ctx.Params(":action") {

templates/repo/star_unstar.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star">
1+
<form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsStarringRepo}}un{{end}}star">
22
<div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.star_guest_user"}}"{{end}}>
33
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
4-
{{if $.IsStaringRepo}}
4+
{{if $.IsStarringRepo}}
55
{{svg "octicon-star-fill"}}<span class="text">{{ctx.Locale.Tr "repo.unstar"}}</span>
66
{{else}}
77
{{svg "octicon-star"}}<span class="text">{{ctx.Locale.Tr "repo.star"}}</span>

0 commit comments

Comments
 (0)