0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-15 15:03:32 +02:00

fix: resync with changes on main

This commit is contained in:
Alexandre Bontems 2026-05-06 14:13:19 +02:00
parent 9006c70cf0
commit 6d11cb10df
No known key found for this signature in database
GPG Key ID: 37B7C811C1723B5E

View File

@ -1,25 +1,25 @@
<div class="ui buttons" {{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 basic compact small button" aria-label="{{$buttonText}}"
<a role="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.buttons)"
{{else}}
disabled
href="{{AppSubUrl}}/user/login"
{{end}}
>
{{svg "octicon-eye"}}
<span class="not-mobile" aria-hidden="true">{{$buttonText}}</span>
</button>
<a class="ui basic compact small button watch-label" href="{{.RepoLink}}/watchers">
</a>
<a class="ui basic compact small button watch-label" href="{{$.RepoLink}}/watchers">
{{CountFmt .Repository.NumWatches}}
</a>
{{if $.IsWatchingRepo}}
<a class="ui basic compact small button watch-icon"
data-global-init="initWatchOptions"
data-repo-link="{{.RepoLink}}"
data-repo-link="{{$.RepoLink}}"
data-watch-pull-requests="{{$.Watch.PullRequests}}"
data-watch-issues="{{$.Watch.Issues}}"
data-watch-releases="{{$.Watch.Releases}}"