forked from x/icebergs
opt layout
This commit is contained in:
parent
053d2e3bf9
commit
d5280d34c9
@ -18,6 +18,11 @@ 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.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) {
|
||||||
|
// if _p, ok := ice.Info.Index[key].(*ice.Context); ok && _p.Prefix() == s.Prefix() {
|
||||||
|
// m.Push(mdb.INDEX, key)
|
||||||
|
// } else {
|
||||||
|
// m.Push(mdb.INDEX, kit.Keys(s.Prefix(), key))
|
||||||
|
// }
|
||||||
m.Push(mdb.INDEX, kit.Keys(s.Prefix(), key))
|
m.Push(mdb.INDEX, kit.Keys(s.Prefix(), key))
|
||||||
m.Push(mdb.NAME, kit.Format(cmd.Name))
|
m.Push(mdb.NAME, kit.Format(cmd.Name))
|
||||||
m.Push(mdb.HELP, kit.Format(cmd.Help))
|
m.Push(mdb.HELP, kit.Format(cmd.Help))
|
||||||
|
@ -319,8 +319,9 @@ func init() {
|
|||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
}, StatsAction(), DreamAction(), mdb.ImportantHashAction(
|
}, StatsAction(), DreamAction(), mdb.ImportantHashAction(
|
||||||
html.BUTTON, "web.wiki.portal web.admin web.chat.macos.desktop web.code.git.status web.code.vimer web.code.xterm web.code.compile",
|
mdb.SHORT, mdb.NAME, mdb.FIELD, "time,name,icon,repos,binary,template,restart", ctx.TOOLS, kit.Simple(CODE_GIT_SEARCH, ROUTE),
|
||||||
ctx.TOOLS, "web.code.git.search,route", mdb.SHORT, mdb.NAME, mdb.FIELD, "time,name,icon,repos,binary,template,restart")), Hand: func(m *ice.Message, arg ...string) {
|
html.BUTTON, kit.JoinWord(PORTAL, ADMIN, DESKTOP, WIKI_WORD, CODE_GIT_STATUS, CODE_VIMER, CODE_XTERM, CODE_COMPILE),
|
||||||
|
)), Hand: func(m *ice.Message, arg ...string) {
|
||||||
if len(arg) == 0 {
|
if len(arg) == 0 {
|
||||||
_dream_list(m).RewriteAppend(func(value, key string, index int) string {
|
_dream_list(m).RewriteAppend(func(value, key string, index int) string {
|
||||||
if key == mdb.ICON {
|
if key == mdb.ICON {
|
||||||
|
@ -157,7 +157,8 @@ func RenderVersion(m *ice.Message) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
CHAT = "chat"
|
CHAT = "chat"
|
||||||
|
DESKTOP = "desktop"
|
||||||
|
|
||||||
CODE_GIT_SERVICE = "web.code.git.service"
|
CODE_GIT_SERVICE = "web.code.git.service"
|
||||||
CODE_GIT_SEARCH = "web.code.git.search"
|
CODE_GIT_SEARCH = "web.code.git.search"
|
||||||
|
@ -81,7 +81,7 @@ func init() {
|
|||||||
ice.Index.Register(Index, &Frame{},
|
ice.Index.Register(Index, &Frame{},
|
||||||
BROAD, SERVE, DREAM, ROUTE, SPACE,
|
BROAD, SERVE, DREAM, ROUTE, SPACE,
|
||||||
TOKEN, SHARE, CACHE, SPIDE, COUNT,
|
TOKEN, SHARE, CACHE, SPIDE, COUNT,
|
||||||
ADMIN,
|
ADMIN, STATS,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +73,8 @@ func init() {
|
|||||||
m.Cmd(web.CHAT_FAVOR, mdb.CREATE, mdb.TYPE, nfs.SHY, mdb.NAME, path.Base(arg[0]), mdb.TEXT, arg[0])
|
m.Cmd(web.CHAT_FAVOR, mdb.CREATE, mdb.TYPE, nfs.SHY, mdb.NAME, path.Base(arg[0]), mdb.TEXT, arg[0])
|
||||||
m.ProcessHold("favor success")
|
m.ProcessHold("favor success")
|
||||||
}},
|
}},
|
||||||
|
web.DREAM_TABLES: {Hand: func(m *ice.Message, arg ...string) { m.PushButton(kit.Dict(m.CommandKey(), "文档")) }},
|
||||||
|
web.DREAM_ACTION: {Hand: func(m *ice.Message, arg ...string) { web.DreamProcess(m, nil, arg...) }},
|
||||||
}, WikiAction("", nfs.SHY), mdb.HashAction(mdb.SHORT, nfs.PATH, mdb.FIELD, "time,path")), Hand: func(m *ice.Message, arg ...string) {
|
}, WikiAction("", nfs.SHY), mdb.HashAction(mdb.SHORT, nfs.PATH, mdb.FIELD, "time,path")), Hand: func(m *ice.Message, arg ...string) {
|
||||||
if len(arg) > 0 {
|
if len(arg) > 0 {
|
||||||
mdb.HashCreate(m.Spawn(), nfs.PATH, arg[0])
|
mdb.HashCreate(m.Spawn(), nfs.PATH, arg[0])
|
||||||
|
@ -15,6 +15,6 @@ const GIT = "git"
|
|||||||
|
|
||||||
var Index = &ice.Context{Name: GIT, Help: "代码库"}
|
var Index = &ice.Context{Name: GIT, Help: "代码库"}
|
||||||
|
|
||||||
func init() { code.Index.Register(Index, &web.Frame{}) }
|
func init() { code.Index.Register(Index, &web.Frame{}, STATUS, REPOS) }
|
||||||
|
|
||||||
func Prefix(arg ...string) string { return code.Prefix(GIT, kit.Keys(arg)) }
|
func Prefix(arg ...string) string { return code.Prefix(GIT, kit.Keys(arg)) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user