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
22cf11f229
commit
19396e87a7
2 changed files with 3 additions and 3 deletions
|
|
@ -137,7 +137,7 @@ func InstalledIcons() (ret []*Icon) {
|
||||||
icon.Size = iconDir.Size()
|
icon.Size = iconDir.Size()
|
||||||
icon.HSize = humanize.Bytes(uint64(icon.Size))
|
icon.HSize = humanize.Bytes(uint64(icon.Size))
|
||||||
icon.HUpdated = formatUpdated(icon.Updated)
|
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 {
|
if nil != readErr {
|
||||||
logging.LogWarnf("read install icon README.md failed: %s", readErr)
|
logging.LogWarnf("read install icon README.md failed: %s", readErr)
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ type Package struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func WidgetJSON(widgetDirName string) (ret map[string]interface{}, err error) {
|
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) {
|
if !gulu.File.IsExist(p) {
|
||||||
err = os.ErrNotExist
|
err = os.ErrNotExist
|
||||||
return
|
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) {
|
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) {
|
if !gulu.File.IsExist(p) {
|
||||||
err = os.ErrNotExist
|
err = os.ErrNotExist
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue