mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🎨 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:
parent
c64e976419
commit
3f5c0762e8
6 changed files with 17 additions and 8 deletions
|
|
@ -156,8 +156,9 @@ func InstalledIcons() (ret []*Icon) {
|
|||
continue
|
||||
}
|
||||
|
||||
installPath := filepath.Join(util.IconsPath, dirName)
|
||||
icon.DisallowInstall = disallowInstallBazaarPackage(icon.Package)
|
||||
|
||||
installPath := filepath.Join(util.IconsPath, dirName)
|
||||
icon.Installed = true
|
||||
icon.RepoURL = icon.URL
|
||||
icon.PreviewURL = "/appearance/icons/" + dirName + "/preview.png"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -158,8 +158,9 @@ func InstalledTemplates() (ret []*Template) {
|
|||
continue
|
||||
}
|
||||
|
||||
installPath := filepath.Join(util.DataDir, "templates", dirName)
|
||||
template.DisallowInstall = disallowInstallBazaarPackage(template.Package)
|
||||
|
||||
installPath := filepath.Join(util.DataDir, "templates", dirName)
|
||||
template.Installed = true
|
||||
template.RepoURL = template.URL
|
||||
template.PreviewURL = "/templates/" + dirName + "/preview.png"
|
||||
|
|
|
|||
|
|
@ -159,8 +159,9 @@ func InstalledThemes() (ret []*Theme) {
|
|||
continue
|
||||
}
|
||||
|
||||
installPath := filepath.Join(util.ThemesPath, dirName)
|
||||
theme.DisallowInstall = disallowInstallBazaarPackage(theme.Package)
|
||||
|
||||
installPath := filepath.Join(util.ThemesPath, dirName)
|
||||
theme.Installed = true
|
||||
theme.RepoURL = theme.URL
|
||||
theme.PreviewURL = "/appearance/themes/" + dirName + "/preview.png"
|
||||
|
|
|
|||
|
|
@ -155,8 +155,9 @@ func InstalledWidgets() (ret []*Widget) {
|
|||
continue
|
||||
}
|
||||
|
||||
installPath := filepath.Join(util.DataDir, "widgets", dirName)
|
||||
widget.DisallowInstall = disallowInstallBazaarPackage(widget.Package)
|
||||
|
||||
installPath := filepath.Join(util.DataDir, "widgets", dirName)
|
||||
widget.Installed = true
|
||||
widget.RepoURL = widget.URL
|
||||
widget.PreviewURL = "/widgets/" + dirName + "/preview.png"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue