diff --git a/base/cli/runtime.go b/base/cli/runtime.go index cdb6997b..86161f6b 100644 --- a/base/cli/runtime.go +++ b/base/cli/runtime.go @@ -266,6 +266,7 @@ func init() { }}, "stash": {Help: "清空", Icon: "bi bi-trash", Hand: func(m *ice.Message, arg ...string) { m.Cmd(SYSTEM, "git", "stash") + m.Cmd(SYSTEM, "git", "checkout", ".") m.Go(func() { m.Sleep30ms(ice.QUIT, 1) }) }}, "logs": {Help: "日志", Hand: func(m *ice.Message, arg ...string) { diff --git a/base/web/option.go b/base/web/option.go index 4e140334..72902df9 100644 --- a/base/web/option.go +++ b/base/web/option.go @@ -156,7 +156,7 @@ func GoToast(m *ice.Message, title string, cb func(toast func(name string, count icon := Icons[ice.PROCESS] toast := func(name string, count, total int) { kit.If(total == 0, func() { total = 1 }) - Toast(m, kit.Format("%s %s %s/%s", icon, kit.JoinWord(kit.Select(kit.Select("", m.ActionKey(), m.ActionKey() != ice.LIST), title, m.Option(ice.MSG_TITLE)), name), strings.TrimSuffix(kit.FmtSize(int64(count)), "B"), strings.TrimSuffix(kit.FmtSize(int64(total)), "B")), + Toast(m, kit.Format("%s %s %s", icon, kit.JoinWord(kit.Select(kit.Select("", m.ActionKey(), m.ActionKey() != ice.LIST), title, m.Option(ice.MSG_TITLE)), name), strings.ReplaceAll(kit.FmtSize(count, total), "B", "")), "", m.OptionDefault(ice.TOAST_DURATION, "30s"), count*100/total) _total = total }