mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 改进集市已下载包更新 https://github.com/siyuan-note/siyuan/issues/5807
This commit is contained in:
parent
9bc71a9f2c
commit
3bb1427492
12 changed files with 32 additions and 9 deletions
|
|
@ -133,8 +133,12 @@ func InstalledWidgets() (ret []*Widget) {
|
|||
widget.RepoURL = widget.URL
|
||||
widget.PreviewURL = "/widgets/" + dirName + "/preview.png"
|
||||
widget.PreviewURLThumb = "/widgets/" + dirName + "/preview.png"
|
||||
widget.Updated = widgetDir.ModTime().Format("2006-01-02 15:04:05")
|
||||
widget.HUpdated = formatUpdated(widget.Updated)
|
||||
info, statErr := os.Stat(filepath.Join(installPath, "README.md"))
|
||||
if nil != statErr {
|
||||
logging.LogWarnf("stat install theme README.md failed: %s", statErr)
|
||||
continue
|
||||
}
|
||||
widget.HInstallDate = info.ModTime().Format("2006-01-02")
|
||||
installSize, _ := util.SizeOfDirectory(installPath)
|
||||
widget.InstallSize = installSize
|
||||
widget.HInstallSize = humanize.Bytes(uint64(installSize))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue