<div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.watch_guest_user"}}"{{end}}>
	{{$buttonText := ctx.Locale.Tr "repo.watch"}}
	{{if $.IsWatchingRepo}}{{$buttonText = ctx.Locale.Tr "repo.unwatch"}}{{end}}
	<button type="button" class="ui compact small basic button" aria-label="{{$buttonText}}"
		{{if $.IsSigned}}
			data-fetch-method="post"
			data-fetch-url="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}unwatch{{else}}watch{{end}}"
			data-fetch-sync="$closest(.ui.labeled.button)"
		{{else}}
			disabled
		{{end}}
	>
		{{svg "octicon-eye"}}
		<span class="not-mobile" aria-hidden="true">{{$buttonText}}</span>
	</button>
	<a class="ui basic label" href="{{.RepoLink}}/watchers">
		{{CountFmt .Repository.NumWatches}}
	</a>
</div>
