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, "")
|
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_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) {
|
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)))
|
icon := kit.Format(kit.Value(cmd.Meta, kit.Keys(ice.CTX_ICONS, key)))
|
||||||
m.Push(mdb.INDEX, kit.Keys(s.Prefix(), 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 {
|
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))
|
RenderResult(m, kit.Format("not found command %s", cmd))
|
||||||
} else {
|
} 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))))
|
m.OptionDefault(mdb.ICONS, m.Resource(kit.Select(ice.Info.NodeIcon, msg.Append(mdb.ICONS))))
|
||||||
if !kit.IsIn(cmd, PORTAL, DESKTOP, ADMIN) {
|
if !kit.IsIn(cmd, PORTAL, DESKTOP, ADMIN) {
|
||||||
pod = kit.Select(pod, msg.Option(ice.MSG_NODENAME))
|
pod = kit.Select(pod, msg.Option(ice.MSG_NODENAME))
|
||||||
|
3
conf.go
3
conf.go
@ -256,8 +256,9 @@ const ( // MSG
|
|||||||
LOG_DISABLE = "log.disable"
|
LOG_DISABLE = "log.disable"
|
||||||
LOG_TRACEID = "log.id"
|
LOG_TRACEID = "log.id"
|
||||||
|
|
||||||
MSG_NODETYPE = "node.type"
|
MSG_NODEICON = "node.icon"
|
||||||
MSG_NODENAME = "node.name"
|
MSG_NODENAME = "node.name"
|
||||||
|
MSG_NODETYPE = "node.type"
|
||||||
MSG_FILES = "file.system"
|
MSG_FILES = "file.system"
|
||||||
FROM_SPACE = "from.space"
|
FROM_SPACE = "from.space"
|
||||||
FROM_DAEMON = "from.daemon"
|
FROM_DAEMON = "from.daemon"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user