1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-05-12 02:20:54 +00:00
gitea/templates/repo/watch_unwatch.tmpl
wxiaoguang e625250ffc
Fix various trivial frontend problems ()
1. Fix 
2. Fix 
3. Fix missing spaces, fix misspells, no visual change.
4. Fix missing "not-mobile", fix 

---------

Co-authored-by: silverwind <me@silverwind.io>
2025-04-24 09:11:54 +08:00

14 lines
788 B
Handlebars

<form class="flex-text-inline" hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}unwatch{{else}}watch{{end}}">
<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="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}} aria-label="{{$buttonText}}">
{{svg "octicon-eye"}}
<span class="not-mobile" aria-hidden="true">{{$buttonText}}</span>
</button>
<a hx-boost="false" class="ui basic label" href="{{.RepoLink}}/watchers">
{{CountFmt .Repository.NumWatches}}
</a>
</div>
</form>