mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 14:03:24 +09:00
refactor: drop two unmaintained dependencies, rename the byte size helpers (#39083)
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
{{ctx.Locale.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
|
||||
|
|
||||
</span>
|
||||
{{ctx.Locale.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FileSize .file.LeftBlobSize}}</span>
|
||||
{{ctx.Locale.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FormatByteSize .file.LeftBlobSize}}</span>
|
||||
</p>
|
||||
</span>
|
||||
{{end}}
|
||||
@@ -49,7 +49,7 @@
|
||||
{{ctx.Locale.Tr "repo.diff.file_image_height"}}: <span class="text bounds-info-height"></span>
|
||||
|
|
||||
</span>
|
||||
{{ctx.Locale.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FileSize .file.RightBlobSize}}</span>
|
||||
{{ctx.Locale.Tr "repo.diff.file_byte_size"}}: <span class="text">{{FormatByteSize .file.RightBlobSize}}</span>
|
||||
</p>
|
||||
</span>
|
||||
{{end}}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{{end}}
|
||||
{{if ne .FileSize nil}}
|
||||
<div class="file-info-entry">
|
||||
<span class="file-info-size">{{FileSize .FileSize}}</span>{{if .IsLFSFile}}<span class="ui label">LFS</span>{{end}}
|
||||
<span class="file-info-size">{{FormatByteSize .FileSize}}</span>{{if .IsLFSFile}}<span class="ui label">LFS</span>{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .LFSLock}}
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
</a>
|
||||
{{end}}
|
||||
<div class="flex-text-block muted" {{if not (eq .Repository.Size 0)}}data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}>
|
||||
{{$fileSizeFormatted := FileSize .Repository.Size}}{{/* the formatted string is always "{val} {unit}" */}}
|
||||
{{$fileSizeFormatted := FormatByteSize .Repository.Size}}{{/* the formatted string is always "{val} {unit}" */}}
|
||||
{{$fileSizeFields := StringUtils.Split $fileSizeFormatted " "}}
|
||||
{{svg "octicon-database"}} <b>{{ctx.Locale.PrettyNumber (index $fileSizeFields 0)}}</b> {{index $fileSizeFields 1}}
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex-text-block tw-p-2">
|
||||
<span class="ui tw-text-text-light">{{.Size | FileSize}}</span>
|
||||
<span class="ui tw-text-text-light">{{.Size | FormatByteSize}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{end -}}
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<strong class="flex-text-inline">{{svg "octicon-package" 16 "download-icon"}}<span class="gt-ellipsis">{{$att.Name}}</span></strong>
|
||||
</a>
|
||||
<div class="attachment-right-info flex-text-inline">
|
||||
<span class="tw-pl-5">{{$att.Size | FileSize}}</span>
|
||||
<span class="tw-pl-5">{{$att.Size | FormatByteSize}}</span>
|
||||
<span class="flex-text-inline" data-tooltip-content="{{ctx.Locale.Tr "repo.release.download_count" (ctx.Locale.PrettyNumber $att.DownloadCount)}}">
|
||||
{{svg "octicon-info"}}
|
||||
</span>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<div class="flex-text-block tw-flex-1">
|
||||
<input name="attachment-edit-{{.UUID}}" class="tw-max-w-[48em]" required value="{{.Name}}">
|
||||
<input name="attachment-del-{{.UUID}}" type="hidden" value="false">
|
||||
<span class="tw-text-text-light tw-flex-shrink-0">{{.Size | FileSize}}</span>
|
||||
<span class="tw-text-text-light tw-flex-shrink-0">{{.Size | FormatByteSize}}</span>
|
||||
<span data-tooltip-content="{{ctx.Locale.Tr "repo.release.download_count" (ctx.Locale.PrettyNumber .DownloadCount)}}">
|
||||
{{svg "octicon-info"}}
|
||||
</span>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{{ShortSha .Oid}}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{FileSize .Size}}</td>
|
||||
<td>{{FormatByteSize .Size}}</td>
|
||||
<td>{{DateUtils.TimeSince .CreatedUnix}}</td>
|
||||
<td class="tw-text-right">
|
||||
<a class="ui primary button" href="{{$.Link}}/find?oid={{.Oid}}&size={{.Size}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "repo.repo_size"}}</label>
|
||||
<span {{if not (eq .Repository.Size 0)}} data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}>{{FileSize .Repository.Size}}</span>
|
||||
<span {{if not (eq .Repository.Size 0)}} data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}>{{FormatByteSize .Repository.Size}}</span>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{ctx.Locale.Tr "repo.template"}}</label>
|
||||
|
||||
Reference in New Issue
Block a user