1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-02-16 16:11:37 +08:00
parent d62af7bc90
commit d1c31ad7a7

View File

@ -109,10 +109,14 @@ func _repos_open(m *ice.Message, p string) *git.Repository {
return mdb.HashSelectTarget(m, p, nil).(*git.Repository) return mdb.HashSelectTarget(m, p, nil).(*git.Repository)
} }
func _repos_each(m *ice.Message, title string, cb func(*git.Repository, ice.Maps) error) { func _repos_each(m *ice.Message, title string, cb func(*git.Repository, ice.Maps) error) {
web.GoToastTable(m.Cmd(""), REPOS, func(value ice.Maps) { web.GoToast(m, func(toast func(string, int, int)) []string {
if err := cb(_repos_open(m, value[REPOS]), value); err != nil && err != git.NoErrAlreadyUpToDate { m.Cmd("").Table(func(value ice.Maps, index, total int) {
web.ToastFailure(m, value[REPOS], err.Error()) toast(value[REPOS], index, total)
} if err := cb(_repos_open(m, value[REPOS]), value); err != nil && err != git.NoErrAlreadyUpToDate {
web.ToastFailure(m, value[REPOS], err.Error())
}
})
return nil
}) })
} }
func _repos_each_origin(m *ice.Message, title string, cb func(*git.Repository, string, *http.BasicAuth, ice.Maps) error) { func _repos_each_origin(m *ice.Message, title string, cb func(*git.Repository, string, *http.BasicAuth, ice.Maps) error) {