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

This commit is contained in:
Liang Ding 2022-09-01 19:16:26 +08:00
parent 3750ca12cc
commit a563861ab8
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
5 changed files with 106 additions and 25 deletions

View file

@ -21,6 +21,7 @@ import (
"github.com/88250/gulu"
"github.com/gin-gonic/gin"
"github.com/siyuan-note/siyuan/kernel/bazaar"
"github.com/siyuan-note/siyuan/kernel/model"
"github.com/siyuan-note/siyuan/kernel/util"
)
@ -221,6 +222,15 @@ func getBazaarTheme(c *gin.Context) {
}
}
func getInstalledTheme(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
ret.Data = map[string]interface{}{
"packages": bazaar.InstalledThemes(),
}
}
func installBazaarTheme(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)