mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +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
|
|
@ -135,8 +135,12 @@ func InstalledTemplates() (ret []*Template) {
|
|||
template.RepoURL = template.URL
|
||||
template.PreviewURL = "/templates/" + dirName + "/preview.png"
|
||||
template.PreviewURLThumb = "/templates/" + dirName + "/preview.png"
|
||||
template.Updated = templateDir.ModTime().Format("2006-01-02 15:04:05")
|
||||
template.HUpdated = formatUpdated(template.Updated)
|
||||
info, statErr := os.Stat(filepath.Join(installPath, "README.md"))
|
||||
if nil != statErr {
|
||||
logging.LogWarnf("stat install theme README.md failed: %s", statErr)
|
||||
continue
|
||||
}
|
||||
template.HInstallDate = info.ModTime().Format("2006-01-02")
|
||||
installSize, _ := util.SizeOfDirectory(installPath)
|
||||
template.InstallSize = installSize
|
||||
template.HInstallSize = humanize.Bytes(uint64(installSize))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue