mirror of
https://shylinux.com/x/icebergs
synced 2025-04-27 01:48:27 +08:00
opt some
This commit is contained in:
parent
4a63b654bd
commit
19e4f6df22
@ -72,7 +72,7 @@ func Toast(m *ice.Message, text string, arg ...ice.Any) { // [title [duration [p
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PushNoticeToast(m, "", text, arg)
|
PushNoticeToast(m, text, arg)
|
||||||
}
|
}
|
||||||
func Toast3s(m *ice.Message, text string, arg ...ice.Any) {
|
func Toast3s(m *ice.Message, text string, arg ...ice.Any) {
|
||||||
Toast(m, text, kit.List(kit.Select("", arg, 0), kit.Select("3s", arg, 1))...)
|
Toast(m, text, kit.List(kit.Select("", arg, 0), kit.Select("3s", arg, 1))...)
|
||||||
|
@ -14,7 +14,6 @@ import (
|
|||||||
"shylinux.com/x/icebergs/base/web"
|
"shylinux.com/x/icebergs/base/web"
|
||||||
"shylinux.com/x/icebergs/core/code"
|
"shylinux.com/x/icebergs/core/code"
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
"shylinux.com/x/toolkits/task"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func _status_tag(m *ice.Message, tags string) string {
|
func _status_tag(m *ice.Message, tags string) string {
|
||||||
@ -127,8 +126,7 @@ func _status_stat(m *ice.Message, files, adds, dels int) (int, int, int) {
|
|||||||
}
|
}
|
||||||
func _status_list(m *ice.Message) (files, adds, dels int, last time.Time) {
|
func _status_list(m *ice.Message) (files, adds, dels int, last time.Time) {
|
||||||
defer m.Sort("repos,type")
|
defer m.Sort("repos,type")
|
||||||
// m.Cmd(REPOS, ice.OptionFields("name,path")).Tables(func(value ice.Maps) {
|
m.Cmd(REPOS, ice.OptionFields("name,path")).Tables(func(value ice.Maps) {
|
||||||
m.Cmd(REPOS, ice.OptionFields("name,path")).TableGo(func(value ice.Maps, lock *task.Lock) {
|
|
||||||
msg := m.Spawn(kit.Dict(cli.CMD_DIR, value[nfs.PATH]))
|
msg := m.Spawn(kit.Dict(cli.CMD_DIR, value[nfs.PATH]))
|
||||||
diff := _git_cmds(msg, STATUS, "-sb")
|
diff := _git_cmds(msg, STATUS, "-sb")
|
||||||
tags := _git_cmds(msg, "describe", "--tags")
|
tags := _git_cmds(msg, "describe", "--tags")
|
||||||
@ -138,7 +136,6 @@ func _status_list(m *ice.Message) (files, adds, dels int, last time.Time) {
|
|||||||
if files, adds, dels = files+_files, adds+_adds, dels+_dels; now.After(last) {
|
if files, adds, dels = files+_files, adds+_adds, dels+_dels; now.After(last) {
|
||||||
last = now
|
last = now
|
||||||
}
|
}
|
||||||
defer lock.Lock()()
|
|
||||||
|
|
||||||
for _, v := range strings.Split(strings.TrimSpace(diff), ice.NL) {
|
for _, v := range strings.Split(strings.TrimSpace(diff), ice.NL) {
|
||||||
if v == "" {
|
if v == "" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user