mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 03:58:28 +02:00
UI related changed for ENABLE_SIZE_LIMIT & REPO_SIZE_LIMIT options
This commit is contained in:
1 parent
a22b73866a
commit
66c476e5de
7 files changed
+98
-1
No files matched your search
@@ -138,7 +138,14 @@ func CreateTimeLimitCode(data string, minutes int, startInf interface{}) string
|
||||
|
||||
// FileSize calculates the file size and generate user-friendly string.
|
||||
func FileSize(s int64) string {
|
||||
return humanize.IBytes(uint64(s))
|
||||
return humanize.Bytes(uint64(s))
|
||||
}
|
||||
|
||||
// Get FileSize bytes value from String.
|
||||
func GetFileSize(s string) (int64, error) {
|
||||
v, err := humanize.ParseBytes(s)
|
||||
iv := int64(v)
|
||||
return iv, err
|
||||
}
|
||||
|
||||
// EllipsisString returns a truncated short string,
|
||||
|
||||
Reference in new issue
Block a user