2024-03-04 05:56:34 -07:00
|
|
|
<form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}unstar{{else}}star{{end}}">
|
2024-02-05 02:56:20 -07:00
|
|
|
<div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.star_guest_user"}}"{{end}}>
|
2024-03-04 05:56:34 -07:00
|
|
|
{{$buttonText := ctx.Locale.Tr "repo.star"}}
|
|
|
|
{{if $.IsStaringRepo}}{{$buttonText = ctx.Locale.Tr "repo.unstar"}}{{end}}
|
|
|
|
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}} aria-label="{{$buttonText}}">
|
2024-06-11 07:07:10 -06:00
|
|
|
{{svg (Iif $.IsStaringRepo "octicon-star-fill" "octicon-star")}}
|
2024-04-16 09:46:12 -06:00
|
|
|
<span aria-hidden="true">{{$buttonText}}</span>
|
2024-02-05 02:56:20 -07:00
|
|
|
</button>
|
|
|
|
<a hx-boost="false" class="ui basic label" href="{{$.RepoLink}}/stars">
|
|
|
|
{{CountFmt .Repository.NumStars}}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</form>
|