File tree Expand file tree Collapse file tree 3 files changed +12
-17
lines changed Expand file tree Collapse file tree 3 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 1
- <form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end }}star">
1
+ <form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}unstar{{else }}star{{end}} ">
2
2
<div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.star_guest_user"}}"{{end}}>
3
- <button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
4
- {{if $.IsStaringRepo}}
5
- {{svg "octicon-star-fill"}}<span class="text">{{ctx.Locale.Tr "repo.unstar"}}</span>
6
- {{else}}
7
- {{svg "octicon-star"}}<span class="text">{{ctx.Locale.Tr "repo.star"}}</span>
8
- {{end}}
3
+ {{$buttonText := ctx.Locale.Tr "repo.star"}}
4
+ {{if $.IsStaringRepo}}{{$buttonText = ctx.Locale.Tr "repo.unstar"}}{{end}}
5
+ <button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}} aria-label="{{$buttonText}}">
6
+ {{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{else}}{{svg "octicon-star"}}{{end}}
7
+ <span class="not-mobile" aria-hidden="true">{{$buttonText}}</span>
9
8
</button>
10
9
<a hx-boost="false" class="ui basic label" href="{{$.RepoLink}}/stars">
11
10
{{CountFmt .Repository.NumStars}}
Original file line number Diff line number Diff line change 1
- <form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end }}watch">
1
+ <form hx-boost="true" hx-target="this" method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}unwatch{{else }}watch{{end}} ">
2
2
<div class="ui labeled button" {{if not $.IsSigned}}data-tooltip-content="{{ctx.Locale.Tr "repo.watch_guest_user"}}"{{end}}>
3
- <button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
4
- {{if $.IsWatchingRepo}}
5
- {{svg "octicon-eye-closed" 16}}<span class="text">{{ctx.Locale.Tr "repo.unwatch"}}</span>
6
- {{else}}
7
- {{svg "octicon-eye"}}<span class="text">{{ctx.Locale.Tr "repo.watch"}}</span>
8
- {{end}}
3
+ {{$buttonText := ctx.Locale.Tr "repo.watch"}}
4
+ {{if $.IsWatchingRepo}}{{$buttonText = ctx.Locale.Tr "repo.unwatch"}}{{end}}
5
+ <button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}} aria-label="{{$buttonText}}">
6
+ {{if $.IsWatchingRepo}}{{svg "octicon-eye-closed"}}{{else}}{{svg "octicon-eye"}}{{end}}
7
+ <span class="not-mobile" aria-hidden="true">{{$buttonText}}</span>
9
8
</button>
10
9
<a hx-boost="false" class="ui basic label" href="{{.RepoLink}}/watchers">
11
10
{{CountFmt .Repository.NumWatches}}
Original file line number Diff line number Diff line change 89
89
.repo-header .flex-item {
90
90
flex-grow : 1 ;
91
91
}
92
- .repo-buttons .ui .labeled .button .text {
93
- display : none;
94
- }
95
92
.repo-header .flex-item-trailing .label {
96
93
display : none;
97
94
}
You can’t perform that action at this time.
0 commit comments