0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-04 22:57:34 -04:00

use AdditionalClasses, use null for replaceState

This commit is contained in:
wxiaoguang 2025-07-04 19:42:36 +08:00
parent eeb77da1b1
commit 86b8b7cd11
4 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@
{{end}}
{{if $.CommitsTagsMap}}
{{range (index $.CommitsTagsMap .ID.String)}}
{{- template "repo/tag/name" dict "ExtraClass" "tw-py-0" "RepoLink" $.Repository.Link "TagName" .TagName "IsRelease" (not .IsTag) -}}
{{- template "repo/tag/name" dict "AdditionalClasses" "tw-py-0" "RepoLink" $.Repository.Link "TagName" .TagName "IsRelease" (not .IsTag) -}}
{{end}}
{{end}}
</td>

View File

@ -25,7 +25,7 @@
</a>
{{end}}
{{else if eq $refGroup "tags"}}
{{- template "repo/tag/name" dict "ExtraClass" "tag-label" "RepoLink" $.Repository.Link "TagName" .ShortName -}}
{{- template "repo/tag/name" dict "AdditionalClasses" "tag-label" "RepoLink" $.Repository.Link "TagName" .ShortName -}}
{{else if eq $refGroup "remotes"}}
<a class="ui basic tiny button" href="{{$.RepoLink}}/src/commit/{{$commit.Rev|PathEscape}}">
{{svg "octicon-cross-reference"}} {{.ShortName}}

View File

@ -1,3 +1,3 @@
<a class="ui basic label {{if .IsRelease}}primary{{end}} {{.ExtraClass}}" href="{{.RepoLink}}/src/tag/{{.TagName|PathEscape}}">
<a class="ui basic label {{if .IsRelease}}primary{{end}} {{.AdditionalClasses}}" href="{{.RepoLink}}/src/tag/{{.TagName|PathEscape}}">
{{svg "octicon-tag"}} {{.TagName}}
</a>

View File

@ -17,7 +17,7 @@ export function initRepoGraphGit() {
const params = new URLSearchParams(window.location.search);
params.set('mode', mode);
window.history.replaceState({}, '', `?${params.toString()}`);
window.history.replaceState(null, '', `?${params.toString()}`);
for (const link of document.querySelectorAll('#pagination .pagination a')) {
const href = link.getAttribute('href');
if (!href) continue;