From 585e11b329a08ded96a33822410defb6177abf57 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 23 Jun 2023 22:53:34 +0800 Subject: [PATCH] :art: Support one-click enable/disable of all downloaded plugins https://github.com/siyuan-note/siyuan/issues/8523 --- kernel/conf/bazaar.go | 8 ++++---- kernel/model/plugin.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/conf/bazaar.go b/kernel/conf/bazaar.go index 41bcc6c99..af41c340f 100644 --- a/kernel/conf/bazaar.go +++ b/kernel/conf/bazaar.go @@ -17,13 +17,13 @@ package conf type Bazaar struct { - Trust bool `json:"trust"` - Petal bool `json:"petal"` + Trust bool `json:"trust"` + PetalDisabled bool `json:"petalDisabled"` } func NewBazaar() *Bazaar { return &Bazaar{ - Trust: false, - Petal: true, + Trust: false, + PetalDisabled: false, } } diff --git a/kernel/model/plugin.go b/kernel/model/plugin.go index 510b89797..93b7431dd 100644 --- a/kernel/model/plugin.go +++ b/kernel/model/plugin.go @@ -72,7 +72,7 @@ func SetPetalEnabled(name string, enabled bool, frontend string) (ret *Petal, er func LoadPetals(frontend string) (ret []*Petal) { ret = []*Petal{} - if !Conf.Bazaar.Petal { + if Conf.Bazaar.PetalDisabled { return }