mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-02 06:48:49 +01:00
🎨 One-click upgrade of downloaded marketplace packages https://github.com/siyuan-note/siyuan/issues/8390
This commit is contained in:
parent
055e011b3e
commit
d793155e55
1 changed files with 30 additions and 5 deletions
|
|
@ -35,27 +35,52 @@ func UpdatedPackages(frontend string) (plugins []*bazaar.Plugin, widgets []*baza
|
|||
wg.Add(5)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
plugins = InstalledPlugins(frontend, "")
|
||||
tmp := InstalledPlugins(frontend, "")
|
||||
for _, plugin := range tmp {
|
||||
if plugin.Outdated {
|
||||
plugins = append(plugins, plugin)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
widgets = InstalledWidgets("")
|
||||
tmp := InstalledWidgets("")
|
||||
for _, widget := range tmp {
|
||||
if widget.Outdated {
|
||||
widgets = append(widgets, widget)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
icons = InstalledIcons("")
|
||||
tmp := InstalledIcons("")
|
||||
for _, icon := range tmp {
|
||||
if icon.Outdated {
|
||||
icons = append(icons, icon)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
themes = InstalledThemes("")
|
||||
tmp := InstalledThemes("")
|
||||
for _, theme := range tmp {
|
||||
if theme.Outdated {
|
||||
themes = append(themes, theme)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
templates = InstalledTemplates("")
|
||||
tmp := InstalledTemplates("")
|
||||
for _, template := range tmp {
|
||||
if template.Outdated {
|
||||
templates = append(templates, template)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
wg.Wait()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue