feat: optimize log indexes

This commit is contained in:
Jason Song
2022-10-18 17:17:58 +08:00
parent bb4963fd4a
commit dd5b2c5dfd
7 changed files with 59 additions and 25 deletions

View File

@@ -1,10 +1,10 @@
<div class="ui compact tiny menu">
<a class="{{if not .IsShowClosed}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
{{svg "octicon-issue-opened" 16 "mr-3"}}
{{.locale.Tr "repo.issues.open_tab" .Repository.NumOpenBuilds}}
{{.locale.Tr "repo.issues.open_tab" .Repository.NumOpenRuns}}
</a>
<a class="{{if .IsShowClosed}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
{{svg "octicon-issue-closed" 16 "mr-3"}}
{{.locale.Tr "repo.issues.close_tab" .Repository.NumClosedBuilds}}
{{.locale.Tr "repo.issues.close_tab" .Repository.NumClosedRuns}}
</a>
</div>

View File

@@ -186,8 +186,8 @@
{{ if and (not .UnitBuildsGlobalDisabled) (.Permission.CanRead $.UnitTypeBuilds)}}
<a class="{{if .PageIsBuildList}}active{{end}} item" href="{{.RepoLink}}/builds">
{{svg "octicon-git-builds"}} {{.locale.Tr "repo.builds"}}
{{if .Repository.NumOpenBuilds}}
<span class="ui blue small label">{{CountFmt .Repository.NumOpenBuilds}}</span>
{{if .Repository.NumOpenRuns}}
<span class="ui blue small label">{{CountFmt .Repository.NumOpenRuns}}</span>
{{end}}
</a>
{{end}}