This commit is contained in:
Daniel 2024-04-24 19:56:04 +08:00
parent 1bc11a1a9a
commit bababec4d1
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -1958,15 +1958,15 @@ func GetCloudSpace() (s *Sync, b *Backup, hSize, hAssetSize, hTotalSize, hExchan
hTrafficAPIGet = "-" hTrafficAPIGet = "-"
hTrafficAPIPut = "-" hTrafficAPIPut = "-"
if conf.ProviderSiYuan == Conf.Sync.Provider { if conf.ProviderSiYuan == Conf.Sync.Provider {
s.HSize = humanize.Bytes(uint64(syncSize)) s.HSize = humanize.BytesCustomCeil(uint64(syncSize), 2)
b.HSize = humanize.Bytes(uint64(backupSize)) b.HSize = humanize.BytesCustomCeil(uint64(backupSize), 2)
hAssetSize = humanize.Bytes(uint64(assetSize)) hAssetSize = humanize.BytesCustomCeil(uint64(assetSize), 2)
hSize = humanize.Bytes(uint64(totalSize)) hSize = humanize.BytesCustomCeil(uint64(totalSize), 2)
u := Conf.GetUser() u := Conf.GetUser()
hTotalSize = humanize.Bytes(uint64(u.UserSiYuanRepoSize)) hTotalSize = humanize.BytesCustomCeil(uint64(u.UserSiYuanRepoSize), 2)
hExchangeSize = humanize.Bytes(uint64(u.UserSiYuanPointExchangeRepoSize)) hExchangeSize = humanize.BytesCustomCeil(uint64(u.UserSiYuanPointExchangeRepoSize), 2)
hTrafficUploadSize = humanize.Bytes(uint64(u.UserTrafficUpload)) hTrafficUploadSize = humanize.BytesCustomCeil(uint64(u.UserTrafficUpload), 2)
hTrafficDownloadSize = humanize.Bytes(uint64(u.UserTrafficDownload)) hTrafficDownloadSize = humanize.BytesCustomCeil(uint64(u.UserTrafficDownload), 2)
hTrafficAPIGet = humanize.SIWithDigits(u.UserTrafficAPIGet, 2, "") hTrafficAPIGet = humanize.SIWithDigits(u.UserTrafficAPIGet, 2, "")
hTrafficAPIPut = humanize.SIWithDigits(u.UserTrafficAPIPut, 2, "") hTrafficAPIPut = humanize.SIWithDigits(u.UserTrafficAPIPut, 2, "")
} }