🎨 Add plugin config items backends and frontends https://github.com/siyuan-note/siyuan/issues/8386

Improve plugin load performance https://github.com/siyuan-note/siyuan/issues/8397
This commit is contained in:
Daniel 2023-05-29 21:18:26 +08:00
parent f5a9c2d316
commit bd9affef7f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -52,7 +52,7 @@ func BazaarPlugins(frontend string) (plugins []*bazaar.Plugin) {
func InstalledPlugins(frontend string) (plugins []*bazaar.Plugin) { func InstalledPlugins(frontend string) (plugins []*bazaar.Plugin) {
plugins = bazaar.InstalledPlugins(frontend, true) plugins = bazaar.InstalledPlugins(frontend, true)
petals := getPetals(frontend) petals := getPetals()
for _, plugin := range plugins { for _, plugin := range plugins {
petal := getPetalByName(plugin.Name, petals) petal := getPetalByName(plugin.Name, petals)
if nil != petal { if nil != petal {
@ -78,7 +78,7 @@ func UninstallBazaarPlugin(pluginName, frontend string) error {
return errors.New(fmt.Sprintf(Conf.Language(47), err.Error())) return errors.New(fmt.Sprintf(Conf.Language(47), err.Error()))
} }
petals := getPetals(frontend) petals := getPetals()
var tmp []*Petal var tmp []*Petal
for i, petal := range petals { for i, petal := range petals {
if petal.Name != pluginName { if petal.Name != pluginName {