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

This commit is contained in:
Daniel 2023-05-29 20:16:23 +08:00
parent ec0682358f
commit 02b62eba65
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
10 changed files with 93 additions and 23 deletions

View file

@ -38,10 +38,10 @@ type Petal struct {
I18n map[string]interface{} `json:"i18n"` // i18n text
}
func SetPetalEnabled(name string, enabled bool) (ret *Petal) {
func SetPetalEnabled(name string, enabled bool, frontend string) (ret *Petal) {
petals := getPetals()
plugins := bazaar.InstalledPlugins()
plugins := bazaar.InstalledPlugins(frontend)
var plugin *bazaar.Plugin
for _, p := range plugins {
if p.Name == name {