mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-08 00:04:21 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
51b362c18f
commit
781144a60d
5 changed files with 10 additions and 5 deletions
|
|
@ -159,15 +159,16 @@ func InstalledIcons() (ret []*Icon) {
|
|||
continue
|
||||
}
|
||||
|
||||
icon.RepoURL = icon.URL
|
||||
icon.DisallowInstall = disallowInstallBazaarPackage(icon.Package)
|
||||
if bazaarPkg := getBazaarIcon(icon.Name, bazaarIcons); nil != bazaarPkg {
|
||||
icon.DisallowUpdate = disallowInstallBazaarPackage(bazaarPkg.Package)
|
||||
icon.UpdateRequiredMinAppVer = bazaarPkg.MinAppVersion
|
||||
icon.RepoURL = bazaarPkg.RepoURL
|
||||
}
|
||||
|
||||
installPath := filepath.Join(util.IconsPath, dirName)
|
||||
icon.Installed = true
|
||||
icon.RepoURL = icon.URL
|
||||
icon.PreviewURL = "/appearance/icons/" + dirName + "/preview.png"
|
||||
icon.PreviewURLThumb = "/appearance/icons/" + dirName + "/preview.png"
|
||||
icon.IconURL = "/appearance/icons/" + dirName + "/icon.png"
|
||||
|
|
|
|||
|
|
@ -195,15 +195,16 @@ func InstalledPlugins(frontend string) (ret []*Plugin) {
|
|||
continue
|
||||
}
|
||||
|
||||
plugin.RepoURL = plugin.URL
|
||||
plugin.DisallowInstall = disallowInstallBazaarPackage(plugin.Package)
|
||||
if bazaarPkg := getBazaarPlugin(plugin.Name, bazaarPlugins); nil != bazaarPkg {
|
||||
plugin.DisallowUpdate = disallowInstallBazaarPackage(bazaarPkg.Package)
|
||||
plugin.UpdateRequiredMinAppVer = bazaarPkg.MinAppVersion
|
||||
plugin.RepoURL = bazaarPkg.RepoURL
|
||||
}
|
||||
|
||||
installPath := filepath.Join(util.DataDir, "plugins", dirName)
|
||||
plugin.Installed = true
|
||||
plugin.RepoURL = plugin.URL
|
||||
plugin.PreviewURL = "/plugins/" + dirName + "/preview.png"
|
||||
plugin.PreviewURLThumb = "/plugins/" + dirName + "/preview.png"
|
||||
plugin.IconURL = "/plugins/" + dirName + "/icon.png"
|
||||
|
|
|
|||
|
|
@ -160,15 +160,16 @@ func InstalledTemplates() (ret []*Template) {
|
|||
continue
|
||||
}
|
||||
|
||||
template.RepoURL = template.URL
|
||||
template.DisallowInstall = disallowInstallBazaarPackage(template.Package)
|
||||
if bazaarPkg := getBazaarTemplate(template.Name, bazaarTemplates); nil != bazaarPkg {
|
||||
template.DisallowUpdate = disallowInstallBazaarPackage(bazaarPkg.Package)
|
||||
template.UpdateRequiredMinAppVer = bazaarPkg.MinAppVersion
|
||||
template.RepoURL = bazaarPkg.RepoURL
|
||||
}
|
||||
|
||||
installPath := filepath.Join(util.DataDir, "templates", dirName)
|
||||
template.Installed = true
|
||||
template.RepoURL = template.URL
|
||||
template.PreviewURL = "/templates/" + dirName + "/preview.png"
|
||||
template.PreviewURLThumb = "/templates/" + dirName + "/preview.png"
|
||||
template.IconURL = "/templates/" + dirName + "/icon.png"
|
||||
|
|
|
|||
|
|
@ -161,15 +161,16 @@ func InstalledThemes() (ret []*Theme) {
|
|||
continue
|
||||
}
|
||||
|
||||
theme.RepoURL = theme.URL
|
||||
theme.DisallowInstall = disallowInstallBazaarPackage(theme.Package)
|
||||
if bazaarPkg := getBazaarTheme(theme.Name, bazaarThemes); nil != bazaarPkg {
|
||||
theme.DisallowUpdate = disallowInstallBazaarPackage(bazaarPkg.Package)
|
||||
theme.UpdateRequiredMinAppVer = bazaarPkg.MinAppVersion
|
||||
theme.RepoURL = bazaarPkg.RepoURL
|
||||
}
|
||||
|
||||
installPath := filepath.Join(util.ThemesPath, dirName)
|
||||
theme.Installed = true
|
||||
theme.RepoURL = theme.URL
|
||||
theme.PreviewURL = "/appearance/themes/" + dirName + "/preview.png"
|
||||
theme.PreviewURLThumb = "/appearance/themes/" + dirName + "/preview.png"
|
||||
theme.IconURL = "/appearance/themes/" + dirName + "/icon.png"
|
||||
|
|
|
|||
|
|
@ -157,15 +157,16 @@ func InstalledWidgets() (ret []*Widget) {
|
|||
continue
|
||||
}
|
||||
|
||||
widget.RepoURL = widget.URL
|
||||
widget.DisallowInstall = disallowInstallBazaarPackage(widget.Package)
|
||||
if bazaarPkg := getBazaarWidget(widget.Name, bazaarWidgets); nil != bazaarPkg {
|
||||
widget.DisallowUpdate = disallowInstallBazaarPackage(bazaarPkg.Package)
|
||||
widget.UpdateRequiredMinAppVer = bazaarPkg.MinAppVersion
|
||||
widget.RepoURL = bazaarPkg.RepoURL
|
||||
}
|
||||
|
||||
installPath := filepath.Join(util.DataDir, "widgets", dirName)
|
||||
widget.Installed = true
|
||||
widget.RepoURL = widget.URL
|
||||
widget.PreviewURL = "/widgets/" + dirName + "/preview.png"
|
||||
widget.PreviewURLThumb = "/widgets/" + dirName + "/preview.png"
|
||||
widget.IconURL = "/widgets/" + dirName + "/icon.png"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue