Skip to content

Commit 6ceef87

Browse files
KN4CK3Rwxiaoguang
andauthored
Removed SizeFmt. (#17890)
Co-authored-by: wxiaoguang <[email protected]>
1 parent 03ec9e5 commit 6ceef87

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

modules/templates/helper.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ func NewFuncMap() []template.FuncMap {
125125
"DateFmtShort": func(t time.Time) string {
126126
return t.Format("Jan 02, 2006")
127127
},
128-
"SizeFmt": base.FileSize,
129128
"CountFmt": base.FormatNumberSI,
130129
"SubStr": func(str string, start, length int) string {
131130
if len(str) == 0 {

templates/admin/repo/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<td>{{.NumStars}}</td>
8383
<td>{{.NumForks}}</td>
8484
<td>{{.NumIssues}}</td>
85-
<td>{{SizeFmt .Size}}</td>
85+
<td>{{FileSize .Size}}</td>
8686
<td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
8787
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.ID}}" data-name="{{.Name}}">{{svg "octicon-trash"}}</a></td>
8888
</tr>

templates/repo/settings/options.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</div>
1919
<div class="inline field">
2020
<label>{{.i18n.Tr "repo.repo_size"}}</label>
21-
<span>{{SizeFmt .Repository.Size}}</span>
21+
<span>{{FileSize .Repository.Size}}</span>
2222
</div>
2323
<div class="inline field">
2424
<label>{{.i18n.Tr "repo.template"}}</label>

templates/repo/sub_menu.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</div>
1515
{{end}}
1616
<div class="item">
17-
<span class="ui">{{svg "octicon-database"}} <b>{{SizeFmt .Repository.Size}}</b></span>
17+
<span class="ui">{{svg "octicon-database"}} <b>{{FileSize .Repository.Size}}</b></span>
1818
</div>
1919
{{end}}
2020
</div>

templates/user/settings/repos.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<span class="icon">{{svg "octicon-repo"}}</span>
2828
{{end}}
2929
<a class="name" href="{{$repo.Link}}">{{$repo.OwnerName}}/{{$repo.Name}}</a>
30-
<span>{{SizeFmt $repo.Size}}</span>
30+
<span>{{FileSize $repo.Size}}</span>
3131
{{if $repo.IsFork}}
3232
{{$.i18n.Tr "repo.forked_from"}}
3333
<span><a href="{{$repo.BaseRepo.Link}}">{{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}}</a></span>
@@ -120,7 +120,7 @@
120120
<span class="iconFloat">{{svg "octicon-repo"}}</span>
121121
{{end}}
122122
<a class="name" href="{{.Link}}">{{.OwnerName}}/{{.Name}}</a>
123-
<span>{{SizeFmt .Size}}</span>
123+
<span>{{FileSize .Size}}</span>
124124
{{if .IsFork}}
125125
{{$.i18n.Tr "repo.forked_from"}}
126126
<span><a href="{{.BaseRepo.Link}}">{{.BaseRepo.OwnerName}}/{{.BaseRepo.Name}}</a></span>

0 commit comments

Comments
 (0)