mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
add some
This commit is contained in:
parent
6e05c8243e
commit
df1fbade2f
@ -232,10 +232,12 @@ func init() {
|
||||
})
|
||||
}},
|
||||
cli.BUILD: {Name: "build name", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Option(ice.MSG_TITLE, m.ActionKey())
|
||||
m.Cmd("", FOR_FLOW, m.Option(mdb.NAME), kit.JoinWord(cli.SH, ice.ETC_MISS_SH))
|
||||
m.Sleep3s().Cmdy(ROUTE, cli.BUILD).ProcessInner()
|
||||
}},
|
||||
PUBLISH: {Name: "publish name", Help: "发布", Icon: "bi bi-send-check", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Option(ice.MSG_TITLE, m.ActionKey())
|
||||
defer ToastProcess(m)()
|
||||
list := []string{cli.LINUX, cli.DARWIN, cli.WINDOWS}
|
||||
msg := m.Spawn(ice.Maps{ice.MSG_DAEMON: ""})
|
||||
@ -246,7 +248,7 @@ func init() {
|
||||
DreamEach(m, m.Option(mdb.NAME), "", func(name string) {
|
||||
m.Cmd(SPACE, name, CODE_AUTOGEN, "binpack")
|
||||
kit.For(list, func(goos string) {
|
||||
PushNoticeRich(m, mdb.NAME, name, msg.Cmd(SPACE, name, CODE_COMPILE, goos, cli.AMD64).AppendSimple())
|
||||
PushNoticeRich(m, mdb.NAME, name, msg.Cmd(SPACE, name, CODE_COMPILE, goos, cli.AMD64, kit.Dict(ice.MSG_USERPOD, name)).AppendSimple())
|
||||
})
|
||||
})
|
||||
m.ProcessHold()
|
||||
|
@ -90,19 +90,26 @@ func PushImages(m *ice.Message, name string) {
|
||||
}
|
||||
}
|
||||
func PushNotice(m *ice.Message, arg ...ice.Any) {
|
||||
if m.Option(ice.MSG_DAEMON) == "" {
|
||||
return
|
||||
}
|
||||
opts := ice.Map{ice.MSG_OPTION: []string{}, ice.MSG_OPTS: []string{}}
|
||||
kit.For([]string{ctx.DISPLAY, ctx.STYLE, cli.DELAY, ice.LOG_DEBUG, ice.LOG_TRACEID}, func(key string) {
|
||||
kit.For([]string{ice.MSG_TITLE, ctx.DISPLAY, ctx.STYLE, cli.DELAY, ice.MSG_STATUS, ice.LOG_DEBUG, ice.LOG_TRACEID}, func(key string) {
|
||||
opts[ice.MSG_OPTION] = kit.Simple(opts[ice.MSG_OPTION], key)
|
||||
opts[key] = m.Option(key)
|
||||
})
|
||||
if m.Option(ice.MSG_DAEMON) != "" {
|
||||
m.Cmd(SPACE, m.Option(ice.MSG_DAEMON), arg, opts)
|
||||
}
|
||||
m.Cmd(SPACE, m.Option(ice.MSG_DAEMON), arg, opts)
|
||||
}
|
||||
func PushNoticeRefresh(m *ice.Message, arg ...ice.Any) { PushNotice(m, kit.List("refresh", arg)...) }
|
||||
func PushNoticeToast(m *ice.Message, arg ...ice.Any) { PushNotice(m, kit.List("toast", arg)...) }
|
||||
func PushNoticeGrow(m *ice.Message, arg ...ice.Any) { PushNotice(m, kit.List("grow", arg)...) }
|
||||
func PushNoticeRich(m *ice.Message, arg ...ice.Any) { PushNotice(m, kit.Simple("rich", arg)) }
|
||||
func PushNoticeGrow(m *ice.Message, arg ...ice.Any) {
|
||||
m.StatusTimeCount()
|
||||
PushNotice(m, kit.List("grow", arg)...)
|
||||
}
|
||||
func PushNoticeRich(m *ice.Message, arg ...ice.Any) {
|
||||
m.StatusTimeCount()
|
||||
PushNotice(m, kit.Simple("rich", arg))
|
||||
}
|
||||
func PushStream(m *ice.Message) *ice.Message {
|
||||
m.Options(cli.CMD_OUTPUT, file.NewWriteCloser(func(buf []byte) { PushNoticeGrow(m, string(buf)) }, nil)).ProcessHold(toastContent(m, ice.SUCCESS))
|
||||
return m
|
||||
|
Loading…
x
Reference in New Issue
Block a user