🎨 Improve minimum version requirements for marketplace packages https://github.com/siyuan-note/siyuan/issues/16688

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-27 13:39:13 +08:00
parent 1e13177aae
commit 24a0c91fae
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -65,14 +65,14 @@ func SetPetalEnabled(name string, enabled bool, frontend string) (ret *Petal, er
ret.DisabledInPublish = disabledInPublish
ret.DisallowInstall = disallowInstall
if incompatible {
if enabled && incompatible {
err = fmt.Errorf(Conf.Language(205))
logging.LogInfof("plugin [%s] is incompatible [%s]", name, frontend)
return
}
if disallowInstall {
msg := "requires upgrading SiYuan to v${x} or later to use"
if enabled && disallowInstall {
msg := "require upgrade SiYuan to use this plugin [" + name + "]"
err = fmt.Errorf(msg)
logging.LogInfof(msg)
return