🎨 集市支持已安装的包单独显示 https://github.com/siyuan-note/siyuan/issues/5678

This commit is contained in:
Liang Ding 2022-09-02 10:41:03 +08:00
parent 22cf11f229
commit 19396e87a7
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 3 additions and 3 deletions

View file

@ -137,7 +137,7 @@ 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.DataDir, "icons", dirName, "README.md"))
readme, readErr := os.ReadFile(filepath.Join(util.AppearancePath, "icons", dirName, "README.md"))
if nil != readErr {
logging.LogWarnf("read install icon README.md failed: %s", readErr)
continue

View file

@ -63,7 +63,7 @@ type Package struct {
}
func WidgetJSON(widgetDirName string) (ret map[string]interface{}, err error) {
p := filepath.Join(util.DataDir, widgetDirName, "widget.json")
p := filepath.Join(util.DataDir, "widgets", widgetDirName, "widget.json")
if !gulu.File.IsExist(p) {
err = os.ErrNotExist
return
@ -85,7 +85,7 @@ func WidgetJSON(widgetDirName string) (ret map[string]interface{}, err error) {
}
func IconJSON(iconDirName string) (ret map[string]interface{}, err error) {
p := filepath.Join(util.ThemesPath, "icons", iconDirName, "icon.json")
p := filepath.Join(util.AppearancePath, "icons", iconDirName, "icon.json")
if !gulu.File.IsExist(p) {
err = os.ErrNotExist
return