mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 集市支持已安装的包单独显示 https://github.com/siyuan-note/siyuan/issues/5678
This commit is contained in:
parent
0f13f79ce4
commit
bb0995eb6b
5 changed files with 23 additions and 19 deletions
|
|
@ -96,7 +96,7 @@ func Icons() (icons []*Icon) {
|
|||
|
||||
func InstalledIcons() (ret []*Icon) {
|
||||
ret = []*Icon{}
|
||||
dir, err := os.Open(filepath.Join(util.AppearancePath, "icons"))
|
||||
dir, err := os.Open(util.IconsPath)
|
||||
if nil != err {
|
||||
logging.LogWarnf("open icons folder failed: %s", err)
|
||||
return
|
||||
|
|
@ -137,14 +137,14 @@ func InstalledIcons() (ret []*Icon) {
|
|||
icon.Size = iconDir.Size()
|
||||
icon.HSize = humanize.Bytes(uint64(icon.Size))
|
||||
icon.HUpdated = formatUpdated(icon.Updated)
|
||||
readme, readErr := os.ReadFile(filepath.Join(util.AppearancePath, "icons", dirName, "README.md"))
|
||||
readme, readErr := os.ReadFile(filepath.Join(util.IconsPath, dirName, "README.md"))
|
||||
if nil != readErr {
|
||||
logging.LogWarnf("read install icon README.md failed: %s", readErr)
|
||||
continue
|
||||
}
|
||||
|
||||
icon.README, _ = renderREADME(icon.URL, readme)
|
||||
icon.Outdated = isOutdatedIcon(icon.URL, icon.Version, bazaarIcons)
|
||||
icon.Outdated = isOutdatedIcon(icon, bazaarIcons)
|
||||
ret = append(ret, icon)
|
||||
}
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue