mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-28 04:18:48 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
de933fe79b
2 changed files with 7 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue