mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 Improve disk usage display https://github.com/siyuan-note/siyuan/issues/11121
This commit is contained in:
parent
ffb44137f2
commit
d9351213da
11 changed files with 21 additions and 21 deletions
|
|
@ -88,7 +88,7 @@ func Icons() (icons []*Icon) {
|
|||
icon.Stars = repo.Stars
|
||||
icon.OpenIssues = repo.OpenIssues
|
||||
icon.Size = repo.Size
|
||||
icon.HSize = humanize.Bytes(uint64(icon.Size))
|
||||
icon.HSize = humanize.BytesCustomCeil(uint64(icon.Size), 2)
|
||||
icon.HUpdated = formatUpdated(icon.Updated)
|
||||
pkg := bazaarIndex[strings.Split(repoURL, "@")[0]]
|
||||
if nil != pkg {
|
||||
|
|
@ -158,7 +158,7 @@ func InstalledIcons() (ret []*Icon) {
|
|||
icon.HInstallDate = info.ModTime().Format("2006-01-02")
|
||||
installSize, _ := util.SizeOfDirectory(installPath)
|
||||
icon.InstallSize = installSize
|
||||
icon.HInstallSize = humanize.Bytes(uint64(installSize))
|
||||
icon.HInstallSize = humanize.BytesCustomCeil(uint64(installSize), 2)
|
||||
readmeFilename := getPreferredReadme(icon.Readme)
|
||||
readme, readErr := os.ReadFile(filepath.Join(installPath, readmeFilename))
|
||||
if nil != readErr {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue