diff --git a/base/cli/system.go b/base/cli/system.go index 620f5059..d1ef1f95 100644 --- a/base/cli/system.go +++ b/base/cli/system.go @@ -93,7 +93,7 @@ func init() { SYSTEM: {Name: SYSTEM, Help: "系统命令", Value: kit.Data()}, }, Commands: map[string]*ice.Command{ - SYSTEM: {Name: "system cmd= 执行:button", Help: "系统命令", Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) { + SYSTEM: {Name: "system cmd= run:button", Help: "系统命令", Hand: func(m *ice.Message, c *ice.Context, key string, arg ...string) { if len(arg) == 0 { m.Fields(len(arg), "time,id,cmd") m.Cmdy(mdb.SELECT, SYSTEM, "", mdb.LIST) diff --git a/base/ssh/scripts.go b/base/ssh/scripts.go index fc5c9432..f2b6687c 100644 --- a/base/ssh/scripts.go +++ b/base/ssh/scripts.go @@ -368,21 +368,21 @@ func init() { m.Cmdy(mdb.SELECT, SOURCE, kit.Keys(kit.MDB_HASH, arg[0]), mdb.LIST, kit.MDB_ID, arg[1:]) m.PushAction(mdb.REPEAT) }}, - TARGET: {Name: "target name 执行:button", Help: "当前模块", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { + TARGET: {Name: "target name run:button", Help: "当前模块", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { f := m.Target().Server().(*Frame) m.Search(arg[0]+".", func(p *ice.Context, s *ice.Context, key string) { f.target = s }) f.prompt(m) }}, - PROMPT: {Name: "prompt arg 执行:button", Help: "命令提示", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { + PROMPT: {Name: "prompt arg run:button", Help: "命令提示", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { f := m.Target().Server().(*Frame) f.ps1 = arg f.prompt(m) }}, - PRINTF: {Name: "printf 执行:button text:textarea", Help: "输出显示", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { + PRINTF: {Name: "printf run:button text:textarea", Help: "输出显示", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { f := m.Target().Server().(*Frame) f.printf(m, arg[0]) }}, - SCREEN: {Name: "screen 执行:button text:textarea", Help: "输出命令", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { + SCREEN: {Name: "screen run:button text:textarea", Help: "输出命令", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { f := m.Target().Server().(*Frame) for _, line := range kit.Split(arg[0], "\n", "\n", "\n") { f.printf(m, line+"\n") diff --git a/base/web/serve.go b/base/web/serve.go index 6f525ef1..e99de4b5 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -72,7 +72,7 @@ func _serve_main(m *ice.Message, w http.ResponseWriter, r *http.Request) bool { } // 文件接口 - if ice.Dump(w, r.URL.Path, func(name string) { RenderType(w, name, "") }) { + if m.Conf(SERVE, kit.Keym("dump")) != ice.FALSE && ice.Dump(w, r.URL.Path, func(name string) { RenderType(w, name, "") }) { return false } return true diff --git a/base/web/spide.go b/base/web/spide.go index 7092ff52..b4ef4ec7 100644 --- a/base/web/spide.go +++ b/base/web/spide.go @@ -335,7 +335,7 @@ func init() { )}, }, Commands: map[string]*ice.Command{ - SPIDE: {Name: "spide client.name action=raw,msg,save,cache method=GET,PUT,POST,DELETE url format=form,part,json,data,file arg 执行:button create", Help: "蜘蛛侠", Action: ice.MergeAction(map[string]*ice.Action{ + SPIDE: {Name: "spide client.name action=raw,msg,save,cache method=GET,PUT,POST,DELETE url format=form,part,json,data,file arg run:button create", Help: "蜘蛛侠", Action: ice.MergeAction(map[string]*ice.Action{ mdb.CREATE: {Name: "create name address", Help: "添加", Hand: func(m *ice.Message, arg ...string) { _spide_create(m, m.Option(kit.MDB_NAME), m.Option(ADDRESS)) }}, @@ -349,14 +349,14 @@ func init() { _spide_show(m, arg...) }}, - SPIDE_GET: {Name: "GET url key value 执行:button", Help: "蜘蛛侠", Action: map[string]*ice.Action{ + SPIDE_GET: {Name: "GET url key value run:button", Help: "蜘蛛侠", Action: map[string]*ice.Action{ mdb.REMOVE: {Name: "remove", Help: "删除", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(mdb.DELETE, SPIDE, "", mdb.HASH, CLIENT_NAME, m.Option(CLIENT_NAME)) }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Echo(kit.Formats(kit.UnMarshal(m.Cmdx(SPIDE, SPIDE_DEV, SPIDE_RAW, SPIDE_GET, arg[0], arg[1:])))) }}, - SPIDE_POST: {Name: "POST url key value 执行:button", Help: "蜘蛛侠", Action: map[string]*ice.Action{ + SPIDE_POST: {Name: "POST url key value run:button", Help: "蜘蛛侠", Action: map[string]*ice.Action{ mdb.REMOVE: {Name: "remove", Help: "删除", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(mdb.DELETE, SPIDE, "", mdb.HASH, CLIENT_NAME, m.Option(CLIENT_NAME)) }}, diff --git a/core/chat/cmd.go b/core/chat/cmd.go index cd4beca2..72db480c 100644 --- a/core/chat/cmd.go +++ b/core/chat/cmd.go @@ -31,7 +31,7 @@ func init() { } m.Cmdy(ctx.COMMAND, arg[0]) }}, - cli.RUN: {Name: "command", Help: "执行", Hand: func(m *ice.Message, arg ...string) { + cli.RUN: {Name: "run", Help: "执行", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(arg) }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { diff --git a/core/chat/header.go b/core/chat/header.go index 21ffc256..6d468e3c 100644 --- a/core/chat/header.go +++ b/core/chat/header.go @@ -79,10 +79,10 @@ func init() { CHECK: {Name: "check", Help: "登录检查", Hand: func(m *ice.Message, arg ...string) { _header_check(m, arg...) }}, - SHARE: {Name: "share type", Help: "扫码登录", Hand: func(m *ice.Message, arg ...string) { + SHARE: {Name: "share type", Help: "共享", Hand: func(m *ice.Message, arg ...string) { _header_share(m, arg...) }}, - GRANT: {Name: "grant space", Help: "扫码授权", Hand: func(m *ice.Message, arg ...string) { + GRANT: {Name: "grant space", Help: "授权", Hand: func(m *ice.Message, arg ...string) { _header_grant(m, arg...) }}, diff --git a/core/chat/pod.go b/core/chat/pod.go index 32035c24..80127485 100644 --- a/core/chat/pod.go +++ b/core/chat/pod.go @@ -26,7 +26,7 @@ func init() { m.Cmdy(ctx.COMMAND, arg[0]) } }}, - cli.RUN: {Name: "command", Help: "执行", Hand: func(m *ice.Message, arg ...string) { + cli.RUN: {Name: "run", Help: "执行", Hand: func(m *ice.Message, arg ...string) { if !m.PodCmd(arg) { m.Cmdy(arg) } diff --git a/core/chat/river.go b/core/chat/river.go index 107fbdc4..04a93126 100644 --- a/core/chat/river.go +++ b/core/chat/river.go @@ -63,8 +63,8 @@ func init() { RIVER: {Name: RIVER, Help: "群组", Value: kit.Data( kit.MDB_PATH, ice.USR_LOCAL_RIVER, MENUS, `["river", - ["添加", "创建群组", "添加应用", "添加工具", "添加设备", "创建空间"], - ["共享", "共享群组", "共享应用", "共享工具", "共享主机", "访问空间"] + ["create", "创建群组", "添加应用", "添加工具", "添加设备", "创建空间"], + ["share", "共享群组", "共享应用", "共享工具", "共享主机", "访问空间"] ]`, )}, }, diff --git a/core/code/compile.go b/core/code/compile.go index 31d0c640..50088aa6 100644 --- a/core/code/compile.go +++ b/core/code/compile.go @@ -26,7 +26,7 @@ func init() { )}, }, Commands: map[string]*ice.Command{ - COMPILE: {Name: "compile arch=amd64,386,arm os=linux,darwin,windows src=src/main.go@key 执行:button", Help: "编译", Action: map[string]*ice.Action{ + COMPILE: {Name: "compile arch=amd64,386,arm os=linux,darwin,windows src=src/main.go@key run:button", Help: "编译", Action: map[string]*ice.Action{ mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(nfs.DIR, "src", "path,size,time", ice.Option{nfs.DIR_REG, `.*\.go$`}) m.Sort(kit.MDB_PATH) diff --git a/core/code/upgrade.go b/core/code/upgrade.go index e9142cb5..8ca8138a 100644 --- a/core/code/upgrade.go +++ b/core/code/upgrade.go @@ -27,7 +27,7 @@ func init() { ))}, }, Commands: map[string]*ice.Command{ - UPGRADE: {Name: "upgrade item=system,source 执行:button", Help: "升级", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { + UPGRADE: {Name: "upgrade item=system,source run:button", Help: "升级", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Grows(cmd, kit.Keys(kit.MDB_HASH, kit.Select(cli.SYSTEM, arg, 0)), "", "", func(index int, value map[string]interface{}) { if value[kit.MDB_PATH] == ice.BIN_ICE_BIN { // 程序文件 value[kit.MDB_FILE] = kit.Keys("ice", m.Conf(cli.RUNTIME, "host.GOOS"), m.Conf(cli.RUNTIME, "host.GOARCH")) diff --git a/core/code/vimer.go b/core/code/vimer.go index a1d408e5..103d45f7 100644 --- a/core/code/vimer.go +++ b/core/code/vimer.go @@ -16,7 +16,7 @@ const VIMER = "vimer" func init() { Index.Merge(&ice.Context{Commands: map[string]*ice.Command{ - VIMER: {Name: "vimer path=src/ file=main.go line=1 刷新:button=auto save", Help: "编辑器", Meta: kit.Dict( + VIMER: {Name: "vimer path=src/ file=main.go line=1 refresh:button=auto save", Help: "编辑器", Meta: kit.Dict( ice.Display("/plugin/local/code/vimer.js", "editor"), ), Action: map[string]*ice.Action{ mdb.ENGINE: {Name: "engine", Help: "运行", Hand: func(m *ice.Message, arg ...string) { diff --git a/core/wiki/draw.go b/core/wiki/draw.go index 6de9174d..1f341254 100644 --- a/core/wiki/draw.go +++ b/core/wiki/draw.go @@ -18,7 +18,7 @@ func init() { )}, }, Commands: map[string]*ice.Command{ - DRAW: {Name: "draw path=src/main.svg 刷新:button=auto 编辑 save 项目 参数", Help: "思维导图", Meta: kit.Dict( + DRAW: {Name: "draw path=src/main.svg refresh:button=auto 编辑 save 项目 参数", Help: "思维导图", Meta: kit.Dict( ice.Display("/plugin/local/wiki/draw.js"), ), Action: map[string]*ice.Action{ nfs.SAVE: {Name: "save path", Help: "保存", Hand: func(m *ice.Message, arg ...string) { diff --git a/core/wiki/word.go b/core/wiki/word.go index b0d5b368..e95feaa7 100644 --- a/core/wiki/word.go +++ b/core/wiki/word.go @@ -63,9 +63,10 @@ func init() { ), )}, }, Commands: map[string]*ice.Command{ - WORD: {Name: "word path=src/main.shy auto 演示", Help: "语言文字", Meta: kit.Dict( + WORD: {Name: "word path=src/main.shy auto play", Help: "语言文字", Meta: kit.Dict( ice.Display("/plugin/local/wiki/word.js", WORD), ), Action: ice.MergeAction(map[string]*ice.Action{ + "play": {Name: "play", Help: "演示"}, web.STORY: {Name: "story", Help: "运行", Hand: func(m *ice.Message, arg ...string) { m.Cmdy(arg[0], ctx.ACTION, cli.RUN, arg[2:]) }}, diff --git a/misc.go b/misc.go index 75cd621b..c6425355 100644 --- a/misc.go +++ b/misc.go @@ -378,8 +378,8 @@ func (c *Context) split(key string, cmd *Command, name string) []interface{} { list = append(list, kit.List(kit.MDB_INPUT, BUTTON, kit.MDB_NAME, "next")...) continue case "auto": - list = append(list, kit.List(kit.MDB_INPUT, BUTTON, kit.MDB_NAME, "查看", kit.MDB_VALUE, "auto")...) - list = append(list, kit.List(kit.MDB_INPUT, BUTTON, kit.MDB_NAME, "返回")...) + list = append(list, kit.List(kit.MDB_INPUT, BUTTON, kit.MDB_NAME, "list", kit.MDB_VALUE, "auto")...) + list = append(list, kit.List(kit.MDB_INPUT, BUTTON, kit.MDB_NAME, "back")...) button = true continue } diff --git a/render.go b/render.go index fb9a0a51..231547fa 100644 --- a/render.go +++ b/render.go @@ -29,7 +29,7 @@ func Render(m *Message, cmd string, args ...interface{}) string { list := []string{} for _, k := range kit.Split(kit.Join(arg)) { list = append(list, kit.Format(``, - k, kit.Select(k, kit.Value(m._cmd.Meta, kit.Keys("_trans", k))))) + k, kit.Select(k, kit.Value(m._cmd.Meta, kit.Keys("_trans", k)), m.Option("language") != "en"))) } return kit.Join(list, " ")