diff --git a/base/ctx/process.go b/base/ctx/process.go index f928a2d7..b6ef61f3 100644 --- a/base/ctx/process.go +++ b/base/ctx/process.go @@ -57,6 +57,9 @@ func ProcessCommand(m *ice.Message, cmd string, args []string, arg ...string) { m.Cmdy(cmd, arg[1:]) } } +func ProcessCmds(m *ice.Message, cmd string, arg ...string) { + m.Cmdy(COMMAND, cmd).Push(ice.ARG, kit.Format(arg)).ProcessField(ACTION, ice.RUN, cmd) +} func ProcessRefresh(m *ice.Message, arg ...string) { m.ProcessRefresh(arg...) } func ProcessRewrite(m *ice.Message, arg ...ice.Any) { m.ProcessRewrite(arg...) } diff --git a/base/mdb/mdb.go b/base/mdb/mdb.go index b9e6f17b..7a632bb2 100644 --- a/base/mdb/mdb.go +++ b/base/mdb/mdb.go @@ -120,6 +120,7 @@ const ( OFFEND = "offend" OFFSET = "offset" + ICON = "icon" PAGE = "page" NEXT = "next" PREV = "prev" @@ -140,6 +141,11 @@ var Index = &ice.Context{Name: MDB, Help: "数据模块", Commands: ice.Commands ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {}}, ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) {}}, INPUTS: {Name: "inputs key sub type field value", Hand: func(m *ice.Message, arg ...string) { + switch arg[3] { + case "index": + m.Cmdy("command", SEARCH, "command", "", "", ice.OptionFields("index")) + return + } kit.Switch(arg[2], HASH, func() { _hash_inputs(m, arg[0], arg[1], kit.Select(NAME, arg, 3), kit.Select("", arg, 4)) }, ZONE, func() { _zone_inputs(m, arg[0], arg[1], arg[3], kit.Select(NAME, arg, 4), kit.Select("", arg, 5)) }, diff --git a/base/web/option.go b/base/web/option.go index 35dc05f5..50b20ffe 100644 --- a/base/web/option.go +++ b/base/web/option.go @@ -111,7 +111,7 @@ func GoToast(m *ice.Message, title string, cb func(toast func(string, int, int)) kit.If(total == 0, func() { total = 1 }) Toast(m, kit.Format("%s %s/%s", name, strings.TrimSuffix(kit.FmtSize(int64(count)), "B"), strings.TrimSuffix(kit.FmtSize(int64(total)), "B")), - kit.Format("%s %d%%", title, count*100/total), kit.Select("3000", "30000", count < total), count*100/total, + kit.Format("%s %d%%", title, count*100/total), kit.Select("1000", "30000", count < total), count*100/total, ) }) } diff --git a/core/chat/footer.go b/core/chat/footer.go index f13c282b..a7fddb8e 100644 --- a/core/chat/footer.go +++ b/core/chat/footer.go @@ -34,6 +34,9 @@ func init() { ctx.CONFIG: {Hand: func(m *ice.Message, arg ...string) { ctx.ProcessField(m, ctx.CONFIG, arg, arg...) }}, + "help": {Hand: func(m *ice.Message, arg ...string) { + ctx.ProcessField(m, web.WIKI_WORD, []string{"src/document/" + arg[0] + "/list.shy"}, arg...) + }}, }, ctx.CmdAction(), aaa.WhiteAction(ctx.COMMAND, ice.RUN)), Hand: func(m *ice.Message, arg ...string) { m.Result(kit.Select(mdb.Config(m, TITLE), ice.Info.Make.Email)) }},