2024-03-04 12:56:34 +00:00
|
|
|
<form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}unwatch{{else}}watch{{end}}">
|
2024-02-05 09:56:20 +00:00
|
|
|
<div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.watch_guest_user"}}"{{end}}>
|
2024-03-04 12:56:34 +00:00
|
|
|
{{$buttonText := ctx.Locale.Tr "repo.watch"}}
|
|
|
|
{{if $.IsWatchingRepo}}{{$buttonText = ctx.Locale.Tr "repo.unwatch"}}{{end}}
|
|
|
|
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}} aria-label="{{$buttonText}}">
|
2024-04-06 08:25:39 +00:00
|
|
|
{{svg "octicon-eye"}}
|
2024-03-04 12:56:34 +00:00
|
|
|
<span class="not-mobile" aria-hidden="true">{{$buttonText}}</span>
|
2024-02-05 09:56:20 +00:00
|
|
|
</button>
|
|
|
|
<a hx-boost="false" class="ui basic label" href="{{.RepoLink}}/watchers">
|
|
|
|
{{CountFmt .Repository.NumWatches}}
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</form>
|