mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -72,9 +72,13 @@ func getInstalledPlugin(c *gin.Context) {
|
||||
}
|
||||
|
||||
frontend := arg["frontend"].(string)
|
||||
var keyword string
|
||||
if keywordArg := arg["keyword"]; nil != keywordArg {
|
||||
keyword = keywordArg.(string)
|
||||
}
|
||||
|
||||
ret.Data = map[string]interface{}{
|
||||
"packages": model.InstalledPlugins(frontend),
|
||||
"packages": model.InstalledPlugins(frontend, keyword),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,9 +60,9 @@ func filterPlugins(plugins []*bazaar.Plugin, keyword string) (ret []*bazaar.Plug
|
||||
return
|
||||
}
|
||||
|
||||
func InstalledPlugins(frontend string) (plugins []*bazaar.Plugin) {
|
||||
func InstalledPlugins(frontend, keyword string) (plugins []*bazaar.Plugin) {
|
||||
plugins = bazaar.InstalledPlugins(frontend, true)
|
||||
|
||||
plugins = filterPlugins(plugins, keyword)
|
||||
petals := getPetals()
|
||||
for _, plugin := range plugins {
|
||||
petal := getPetalByName(plugin.Name, petals)
|
||||
|
||||
Reference in New Issue
Block a user