🎨 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 12:41:03 +08:00
parent c64e976419
commit 3f5c0762e8
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 17 additions and 8 deletions

View file

@ -131,7 +131,7 @@ func Plugins(frontend string) (plugins []*Plugin) {
return
}
func ParseInstalledPlugin(name, frontend string) (found bool, displayName string, incompatible, disabledInPublish bool) {
func ParseInstalledPlugin(name, frontend string) (found bool, displayName string, incompatible, disabledInPublish, disallowInstall bool) {
pluginsPath := filepath.Join(util.DataDir, "plugins")
if !util.IsPathRegularDirOrSymlinkDir(pluginsPath) {
return
@ -161,6 +161,7 @@ func ParseInstalledPlugin(name, frontend string) (found bool, displayName string
displayName = GetPreferredName(plugin.Package)
incompatible = isIncompatiblePlugin(plugin, frontend)
disabledInPublish = plugin.DisabledInPublish
disallowInstall = disallowInstallBazaarPackage(plugin.Package)
}
return
}
@ -195,6 +196,8 @@ func InstalledPlugins(frontend string, checkUpdate bool) (ret []*Plugin) {
continue
}
plugin.DisallowInstall = disallowInstallBazaarPackage(plugin.Package)
installPath := filepath.Join(util.DataDir, "plugins", dirName)
plugin.Installed = true
plugin.RepoURL = plugin.URL