forked from x/icebergs
add some
This commit is contained in:
parent
e00dd72ae4
commit
bb673d80d7
@ -111,7 +111,9 @@ func Toast(m *ice.Message, text string, arg ...ice.Any) *ice.Message { // [title
|
||||
}
|
||||
}
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, m.PrefixKey()) })
|
||||
kit.If(len(arg) > 0 && arg[0] == "", func() { arg[0] = kit.Keys(m.Option(ice.MSG_USERPOD), ctx.ShortCmd(m.PrefixKey())) })
|
||||
kit.If(len(arg) > 0 && arg[0] == "", func() {
|
||||
arg[0] = kit.Keys(m.Option(ice.MSG_USERPOD0), m.Option(ice.MSG_USERPOD), ctx.ShortCmd(m.PrefixKey()))
|
||||
})
|
||||
PushNoticeToast(m, text, arg)
|
||||
return m
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ func init() {
|
||||
}},
|
||||
cli.BUILD: {Name: "build space", Help: "构建", Hand: func(m *ice.Message, arg ...string) {
|
||||
_route_toast(m, m.Option(SPACE), cli.RUNTIME, UPGRADE)
|
||||
m.Option(ice.MSG_TITLE, kit.Keys(m.Option(ice.MSG_USERPOD0), m.Option(ice.MSG_USERPOD), m.CommandKey(), m.ActionKey()))
|
||||
func() { defer ToastProcess(m)(); m.Sleep3s() }()
|
||||
m.SetAppend().Cmdy("", "travel")
|
||||
}},
|
||||
|
@ -12,12 +12,12 @@ Volcanos(chat.ONACTION, {
|
||||
stop: function(event, can, msg) { can.misc.sessionStorage(can, SCRIPT_ZONE, ""), can.Update(event) },
|
||||
play: function(event, can) { var begin = new Date().getTime(); can.core.Next(can._msg.Table(), function(value, next, index, list, data) {
|
||||
var ls = can.core.Split(value.style||""); data = data||{}, data.list = data.list||[]; var fork
|
||||
if (ls && ls.length > 0 && ls[0] == "fork") { data.done = parseInt(ls[1])+1, fork = {skip: parseInt(ls[1])} }
|
||||
if (!fork && data.skip > 0) { return next({skip: data.skip-1}) }
|
||||
if (data.skip > 0) { return next({skip: data.skip-1}) }
|
||||
if (data.done === 0) { return } if (data.done > 0) { data.done -= 1 } data.list.push(value)
|
||||
can.Status(cli.STEP, index), can.Status(cli.COST, can.base.Duration(new Date().getTime()-begin))
|
||||
if (ls && ls.length > 0 && ls[0] == "fork") { data.done = parseInt(ls[1]), fork = {skip: parseInt(ls[1])} }
|
||||
can.user.toastProcess(can, `${can.core.Keys(value.space, value.index)} ${value.play} ${index}/${can._msg.Length()}`, "", index*100/list.length)
|
||||
var tr = can.page.Select(can, can._output, html.TR)[1]; can.onmotion.select(can, tr.parentNode, html.TR, index)
|
||||
can.Status(cli.STEP, index), can.Status(cli.COST, can.base.Duration(new Date().getTime()-begin))
|
||||
value.status == mdb.DISABLE? next(data): can.onaction.preview({}, can, can.request({}, value), next, data)
|
||||
if (fork) { next(fork) }
|
||||
}, function(list) { can.Status(cli.STEP, list.length), can.Status(cli.COST, can.base.Duration(new Date().getTime()-begin)), can.user.toastSuccess(can) }) },
|
||||
|
Loading…
x
Reference in New Issue
Block a user