Переглянути джерело

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

Liang Ding 2 роки тому
батько
коміт
7e8bcc4f62
2 змінених файлів з 3 додано та 3 видалено
  1. 2 2
      kernel/bazaar/icon.go
  2. 1 1
      kernel/bazaar/package.go

+ 2 - 2
kernel/bazaar/icon.go

@@ -96,9 +96,9 @@ func Icons() (icons []*Icon) {
 
 func InstalledIcons() (ret []*Icon) {
 	ret = []*Icon{}
-	dir, err := os.Open(filepath.Join(util.DataDir, "icons"))
+	dir, err := os.Open(filepath.Join(util.AppearancePath, "icons"))
 	if nil != err {
-		logging.LogWarnf("open icons folder [%s] failed: %s", util.ThemesPath, err)
+		logging.LogWarnf("open icons folder failed: %s", err)
 		return
 	}
 	iconDirs, err := dir.Readdir(-1)

+ 1 - 1
kernel/bazaar/package.go

@@ -107,7 +107,7 @@ func IconJSON(iconDirName string) (ret map[string]interface{}, err error) {
 }
 
 func TemplateJSON(templateDirName string) (ret map[string]interface{}, err error) {
-	p := filepath.Join(util.DataDir, templateDirName, "template.json")
+	p := filepath.Join(util.DataDir, "templates", templateDirName, "template.json")
 	if !gulu.File.IsExist(p) {
 		err = os.ErrNotExist
 		return