mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 19:41:05 +08:00
🎨 One-click upgrade of downloaded marketplace packages https://github.com/siyuan-note/siyuan/issues/8390
This commit is contained in:
parent
c45e80b9e0
commit
00d015aead
@ -22,6 +22,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"github.com/88250/gulu"
|
"github.com/88250/gulu"
|
||||||
"github.com/siyuan-note/siyuan/kernel/util"
|
"github.com/siyuan-note/siyuan/kernel/util"
|
||||||
@ -30,11 +31,34 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func BazaarPackages(frontend string) (plugins []*bazaar.Plugin, widgets []*bazaar.Widget, icons []*bazaar.Icon, themes []*bazaar.Theme, templates []*bazaar.Template) {
|
func BazaarPackages(frontend string) (plugins []*bazaar.Plugin, widgets []*bazaar.Widget, icons []*bazaar.Icon, themes []*bazaar.Theme, templates []*bazaar.Template) {
|
||||||
plugins = BazaarPlugins(frontend, "")
|
wg := &sync.WaitGroup{}
|
||||||
widgets = BazaarWidgets("")
|
wg.Add(5)
|
||||||
icons = BazaarIcons("")
|
go func() {
|
||||||
themes = BazaarThemes("")
|
defer wg.Done()
|
||||||
templates = BazaarTemplates("")
|
plugins = InstalledPlugins(frontend, "")
|
||||||
|
}()
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
defer wg.Done()
|
||||||
|
widgets = InstalledWidgets("")
|
||||||
|
}()
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
defer wg.Done()
|
||||||
|
icons = InstalledIcons("")
|
||||||
|
}()
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
defer wg.Done()
|
||||||
|
themes = InstalledThemes("")
|
||||||
|
}()
|
||||||
|
|
||||||
|
go func() {
|
||||||
|
defer wg.Done()
|
||||||
|
templates = InstalledTemplates("")
|
||||||
|
}()
|
||||||
|
|
||||||
|
wg.Wait()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user