forked from x/icebergs
add some
This commit is contained in:
parent
f174577bde
commit
56b87e9e78
@ -18,6 +18,7 @@ func _command_list(m *ice.Message, name string) *ice.Message {
|
||||
return m.Push(mdb.INDEX, name).Push(mdb.NAME, name).Push(mdb.HELP, "").Push(mdb.META, "").Push(mdb.LIST, "")
|
||||
}
|
||||
m.Option(ice.MSG_NODENAME, ice.Info.Titles)
|
||||
m.Option(ice.MSG_NODEICON, m.Resource(ice.Info.NodeIcon))
|
||||
m.Spawn(m.Source()).Search(name, func(p *ice.Context, s *ice.Context, key string, cmd *ice.Command) {
|
||||
icon := kit.Format(kit.Value(cmd.Meta, kit.Keys(ice.CTX_ICONS, key)))
|
||||
m.Push(mdb.INDEX, kit.Keys(s.Prefix(), key))
|
||||
|
@ -163,6 +163,9 @@ func RenderPodCmd(m *ice.Message, pod, cmd string, arg ...ice.Any) {
|
||||
if msg := m.Cmd(Space(m, pod), ctx.COMMAND, kit.Select(m.ShortKey(), cmd)); msg.Length() == 0 {
|
||||
RenderResult(m, kit.Format("not found command %s", cmd))
|
||||
} else {
|
||||
if msg.Append(ctx.INDEX) == "web.code.vimer" {
|
||||
m.Option(mdb.ICONS, msg.Option(ice.MSG_NODEICON))
|
||||
}
|
||||
m.OptionDefault(mdb.ICONS, m.Resource(kit.Select(ice.Info.NodeIcon, msg.Append(mdb.ICONS))))
|
||||
if !kit.IsIn(cmd, PORTAL, DESKTOP, ADMIN) {
|
||||
pod = kit.Select(pod, msg.Option(ice.MSG_NODENAME))
|
||||
|
Loading…
x
Reference in New Issue
Block a user