diff --git a/core/chat/paste.go b/core/chat/paste.go index 234e9a17..30658917 100644 --- a/core/chat/paste.go +++ b/core/chat/paste.go @@ -17,7 +17,7 @@ func init() { ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Load() }}, ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { m.Save(PASTE) }}, - PASTE: {Name: "paste text auto 添加:button", Help: "粘贴板", Meta: kit.Dict( + PASTE: {Name: "paste text auto 粘贴:button", Help: "粘贴板", Meta: kit.Dict( "display", "/plugin/story/paste.js", ), Action: map[string]*ice.Action{ mdb.INSERT: {Name: "insert [key value]...", Help: "添加", Hand: func(m *ice.Message, arg ...string) { diff --git a/core/code/inner.go b/core/code/inner.go index 957df572..d1627b60 100644 --- a/core/code/inner.go +++ b/core/code/inner.go @@ -19,13 +19,15 @@ func _inner_list(m *ice.Message, ext, file, dir string, arg ...string) { if !m.Right(strings.Split(dir, "/"), file) { return } - if m.Cmdy(mdb.RENDER, ext, file, dir, arg); m.Result() == "" { - if m.Conf(INNER, kit.Keys("meta.source", ext)) == "true" { - if m.Cmdy(mdb.RENDER, nfs.FILE, file, dir, arg); m.Result() == "" { - m.Echo(path.Join(dir, file)) - } + if m.Cmdy(mdb.RENDER, ext, file, dir, arg); m.Result() != "" { + return + } + if m.Conf(INNER, kit.Keys("meta.source", ext)) == "true" { + if m.Cmdy(mdb.RENDER, nfs.FILE, file, dir, arg); m.Result() != "" { + return } } + m.Echo(path.Join(dir, file)) } func _inner_show(m *ice.Message, ext, file, dir string, arg ...string) { if m.Cmdy(mdb.ENGINE, ext, file, dir, arg); m.Result() == "" { @@ -105,6 +107,7 @@ func init() { "csv", "true", "json", "true", "css", "true", "html", "true", "txt", "true", "url", "true", + "log", "true", "err", "true", "md", "true", "conf", "true", "ts", "true", "tsx", "true", "vue", "true", "sass", "true", diff --git a/core/code/sh.go b/core/code/sh.go index 825147eb..e89a9a0e 100644 --- a/core/code/sh.go +++ b/core/code/sh.go @@ -39,7 +39,7 @@ func init() { }}, mdb.ENGINE: {Hand: func(m *ice.Message, arg ...string) { m.Option(cli.CMD_DIR, arg[2]) - m.Cmdy(cli.SYSTEM, arg[1]) + m.Cmdy(cli.SYSTEM, "sh", arg[1]) m.Set(ice.MSG_APPEND) }}, diff --git a/core/wiki/data.go b/core/wiki/data.go index 5454dee6..fb919c57 100644 --- a/core/wiki/data.go +++ b/core/wiki/data.go @@ -1,10 +1,12 @@ package wiki import ( - "github.com/shylinux/icebergs" + "path" + + ice "github.com/shylinux/icebergs" "github.com/shylinux/icebergs/base/mdb" "github.com/shylinux/icebergs/base/nfs" - "github.com/shylinux/toolkits" + kit "github.com/shylinux/toolkits" ) func _data_show(m *ice.Message, name string, arg ...string) { @@ -21,7 +23,7 @@ func init() { Index.Merge(&ice.Context{Name: "data", Help: "数据表格", Configs: map[string]*ice.Config{ DATA: {Name: "data", Help: "数据表格", Value: kit.Data( - kit.MDB_SHORT, "name", "path", "", "regs", ".*\\.csv", + "path", "usr/export", "regs", ".*\\.csv", )}, }, Commands: map[string]*ice.Command{ @@ -31,7 +33,7 @@ func init() { }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { if !_wiki_list(m, DATA, kit.Select("./", arg, 0)) { - _data_show(m, arg[0]) + _data_show(m, path.Join(m.Conf(DATA, "meta.path"), arg[0])) } }}, }, diff --git a/core/wiki/feel.go b/core/wiki/feel.go index e2c881f5..7deadac2 100644 --- a/core/wiki/feel.go +++ b/core/wiki/feel.go @@ -16,7 +16,7 @@ func init() { Index.Merge(&ice.Context{Name: "feel", Help: "影音媒体", Configs: map[string]*ice.Config{ FEEL: {Name: "feel", Help: "影音媒体", Value: kit.Data( - "path", "", "regs", ".*.(qrc|png|PNG|jpg|jpeg|JPG|MOV|m4v|mp4)", + "path", "usr/image", "regs", ".*.(qrc|png|PNG|jpg|jpeg|JPG|MOV|m4v|mp4)", )}, }, Commands: map[string]*ice.Command{ @@ -44,14 +44,11 @@ func init() { } }}, }, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) { + m.Option("prefix", m.Conf(FEEL, "meta.path")) if !_wiki_list(m, FEEL, kit.Select("./", arg, 0)) { m.Echo(path.Join(m.Conf(FEEL, "meta.path"), arg[0])) return } - m.Table(func(index int, value map[string]string, head []string) { - m.Push("show", m.Cmdx(mdb.RENDER, web.RENDER.IMG, path.Join("/share/local", value["path"]))) - }) - m.Sort(kit.MDB_TIME, "time_r") }}, }, }, nil) diff --git a/core/wiki/wiki.go b/core/wiki/wiki.go index b2bd9b5d..71151e1c 100644 --- a/core/wiki/wiki.go +++ b/core/wiki/wiki.go @@ -33,7 +33,7 @@ func _wiki_save(m *ice.Message, cmd, name, text string, arg ...string) { } func _wiki_upload(m *ice.Message, cmd string) { m.Cmdy(web.CACHE, web.UPLOAD) - m.Cmdy(web.CACHE, web.WATCH, m.Option(web.DATA), path.Join(m.Option("path"), m.Option("name"))) + m.Cmdy(web.CACHE, web.WATCH, m.Option(web.DATA), path.Join(m.Conf(cmd, "meta.path"), m.Option("path"), m.Option("name"))) } func reply(m *ice.Message, cmd string, arg ...string) bool { diff --git a/misc/wx/wx.shy b/misc/wx/wx.shy index 47ee1547..5b3bd0d5 100644 --- a/misc/wx/wx.shy +++ b/misc/wx/wx.shy @@ -13,7 +13,7 @@ field "编辑器" web.code.vimer args `[ src/ main.go ]` field "资料库" web.chat.meet.miss args `[ ]` field "粘贴板" web.chat.paste.paste args `[ ]` -field "相册集" web.wiki.feel args `[ usr/export/web.chat.meet.miss/feel/ ]` +field "相册集" web.wiki.feel args `[ ]` field "思维导图" web.wiki.draw.draw args `[ src/ main.svg ]` field "任务" web.team.task args `[ ]`