diff --git a/base/aaa/user.go b/base/aaa/user.go index c223e097..b9a95f57 100644 --- a/base/aaa/user.go +++ b/base/aaa/user.go @@ -29,7 +29,6 @@ func _user_login(m *ice.Message, name, word string) { _user_create(m.Spawn(), name, word) } - m.Debug("what %v", m.FormatMeta()) _source := logs.FileLineMeta(logs.FileLine(-1, 3)) mdb.HashSelectDetail(m.Spawn(), name, func(value ice.Map) { if m.Warn(word != "" && word != kit.Format(kit.Value(value, kit.Keys(mdb.EXTRA, PASSWORD))), ice.ErrNotRight) { @@ -42,7 +41,6 @@ func _user_login(m *ice.Message, name, word string) { _source, ) }) - m.Debug("what %v", m.FormatMeta()) } const ( diff --git a/base/cli/mirrors.go b/base/cli/mirrors.go index d6960595..e5e1db13 100644 --- a/base/cli/mirrors.go +++ b/base/cli/mirrors.go @@ -36,6 +36,7 @@ func init() { mdb.ZoneInsert(m, CLI, "go", CMD, kit.Format("install download https://golang.google.cn/dl/go1.15.5.%s-%s.tar.gz usr/local", runtime.GOOS, runtime.GOARCH)) } + IsAlpine(m, "npm") IsAlpine(m, "node", "nodejs") IsAlpine(m, "java", "openjdk8") IsAlpine(m, "javac", "openjdk8") diff --git a/base/web/serve.go b/base/web/serve.go index 3f2ddac4..0d716001 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -279,14 +279,11 @@ func _serve_handle(key string, cmd *ice.Command, msg *ice.Message, w http.Respon } } func _serve_login(msg *ice.Message, key string, cmds []string, w http.ResponseWriter, r *http.Request) ([]string, bool) { - msg.Debug("what %v", msg.Append("extra.password")) aaa.SessCheck(msg, msg.Option(ice.MSG_SESSID)) // 会话认证 - msg.Debug("what %v", msg.Append("extra.password")) if msg.Config("staffname") != "" { aaa.UserLogin(msg, r.Header.Get("Staffname"), "") } - msg.Debug("what %v", msg.Append("extra.password")) if msg.Option(ice.MSG_USERNAME) == "" && msg.Config(tcp.LOCALHOST) == ice.TRUE && tcp.IsLocalHost(msg, msg.Option(ice.MSG_USERIP)) { aaa.UserRoot(msg) // 本机认证 diff --git a/base/web/spide.go b/base/web/spide.go index 629dffa5..20de4b73 100644 --- a/base/web/spide.go +++ b/base/web/spide.go @@ -77,8 +77,6 @@ func _spide_list(m *ice.Message, arg ...string) { }) // 发送请求 - m.Debug("what %v", msg.Append(CLIENT_NAME)) - m.Debug("what %v", msg.FormatsMeta()) res, e := _spide_send(m, msg.Append(CLIENT_NAME), req, kit.Format(msg.Append(CLIENT_TIMEOUT))) if m.Warn(e, ice.ErrNotFound, uri) { return diff --git a/core/chat/header.go b/core/chat/header.go index cde7f1ea..f9d01d04 100644 --- a/core/chat/header.go +++ b/core/chat/header.go @@ -60,6 +60,7 @@ const HEADER = "header" func init() { Index.MergeCommands(ice.Commands{ web.WEB_LOGIN: {Hand: func(m *ice.Message, arg ...string) { + m.Debug("what %v", m.FormatStack(1, 100)) switch kit.Select("", arg, 0) { case web.P(HEADER): switch kit.Select("", arg, 1) { diff --git a/core/chat/river.go b/core/chat/river.go index b9f3bfb6..9f16ac69 100644 --- a/core/chat/river.go +++ b/core/chat/river.go @@ -44,8 +44,8 @@ func _river_list(m *ice.Message) { } m.Cmd(mdb.SELECT, m.PrefixKey(), "", mdb.HASH, ice.OptionFields(mdb.HASH, mdb.NAME)).Tables(func(value ice.Maps) { - m.Cmd(mdb.SELECT, m.PrefixKey(), kit.Keys(mdb.HASH, value[mdb.HASH], OCEAN), mdb.HASH, m.Option(ice.MSG_USERNAME)).Tables(func(value ice.Maps) { - m.Push("", value, []string{mdb.HASH, mdb.NAME}, value) + m.Cmd(mdb.SELECT, m.PrefixKey(), kit.Keys(mdb.HASH, value[mdb.HASH], OCEAN), mdb.HASH, m.Option(ice.MSG_USERNAME)).Tables(func(val ice.Maps) { + m.Push("", value, []string{mdb.HASH, mdb.NAME}, val) }) }) } diff --git a/core/chat/scan.js b/core/chat/scan.js index 6a8aac48..0ed92dc5 100644 --- a/core/chat/scan.js +++ b/core/chat/scan.js @@ -7,7 +7,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar Volcanos(chat.ONACTION, {help: "控件交互", scanQRCode0: function(event, can) { can.user.agent.scanQRCode() }, scanQRCode: function(event, can, button) { can.user.agent.scanQRCode(function(text, data) { - can.runAction(can.request(event, data), data.action||button [], function(msg) { + can.runAction(can.request(event, data), data.action||button, [], function(msg) { can.user.toastSuccess(can, text), can.Update() }, true) }, can) }, diff --git a/core/chat/template.go b/core/chat/template.go index b7afdb35..c0de3844 100644 --- a/core/chat/template.go +++ b/core/chat/template.go @@ -27,9 +27,7 @@ func init() { } }}, RIVER_CREATE: {Name: "river.create river template", Help: "建群", Hand: func(m *ice.Message, arg ...string) { - m.Debug("fuck %v", 123) m.Cmd("", m.Option(TEMPLATE)).Tables(func(value ice.Maps) { - m.Debug("fuck %v", value) h := m.Cmdx(STORM, mdb.CREATE, mdb.TYPE, "", mdb.NAME, value[STORM], mdb.TEXT, "") m.Cmd("", m.Option(TEMPLATE), value[STORM]).Tables(func(value ice.Maps) { m.Cmd(STORM, mdb.INSERT, mdb.HASH, h, kit.SimpleKV("space,index", value)) @@ -76,10 +74,9 @@ func init() { var _river_template = kit.Dict( "base", kit.Dict( "info", kit.List( - "web.chat.info", - "web.chat.ocean", "web.chat.storm", - "web.chat.node", + "web.chat.ocean", + "web.chat.nodes", ), "scan", kit.List( "web.chat.scan", @@ -101,5 +98,9 @@ var _river_template = kit.Dict( "web.wiki.data", "web.wiki.word", ), + "term", kit.List( + "web.code.xterm", + "web.code.vimer", + ), ), ) diff --git a/core/chat/website.go b/core/chat/website.go index bd8075ba..ae58eebc 100644 --- a/core/chat/website.go +++ b/core/chat/website.go @@ -121,7 +121,6 @@ func _website_parse(m *ice.Message, text string, args ...string) (ice.Map, bool) } func _website_render(m *ice.Message, w http.ResponseWriter, r *http.Request, kind, text, name string) bool { msg := m.Spawn(w, r) - m.Debug("what %v", kind) switch kind { case nfs.ZML: web.RenderCmd(msg, "can.parse", text, name) diff --git a/core/code/go.go b/core/code/go.go index 394a7f19..7d24502b 100644 --- a/core/code/go.go +++ b/core/code/go.go @@ -87,7 +87,6 @@ func _go_exec(m *ice.Message, arg ...string) { args := []string{"./bin/ice.bin", ctx.GetFileCmd(path.Join(arg[2], arg[1]))} m.Cmdy(cli.SYSTEM, args) m.StatusTime("args", kit.Join(args, " ")) - m.Debug(m.FormatsMeta()) return } if m.Option(mdb.TEXT) == "" { diff --git a/core/code/js.go b/core/code/js.go index abee25a9..110f524a 100644 --- a/core/code/js.go +++ b/core/code/js.go @@ -41,7 +41,6 @@ func _js_exec(m *ice.Message, arg ...string) { args := kit.Simple("node", "-e", kit.Join(_js_main_script(m, arg...), ice.NL)) m.Cmdy(cli.SYSTEM, args) m.StatusTime("args", kit.Join([]string{"./bin/ice.bin", "web.code.js.js", "exec", path.Join(arg[2], arg[1])}, " ")) - m.Debug(m.FormatsMeta()) return } diff --git a/core/code/publish.go b/core/code/publish.go index 3bd946d0..5fa45df5 100644 --- a/core/code/publish.go +++ b/core/code/publish.go @@ -38,7 +38,6 @@ func _publish_list(m *ice.Message, arg ...string) { m.Option(nfs.DIR_ROOT, ice.USR_PUBLISH) m.Option(nfs.DIR_REG, kit.Select("", arg, 0)) m.Cmdy(nfs.DIR, nfs.PWD, kit.Select(nfs.DIR_WEB_FIELDS, arg, 1)) - m.Debug("what %v", m.FormatsMeta()) } func _publish_bin_list(m *ice.Message, dir string) { p := m.Option(cli.CMD_DIR, dir) diff --git a/core/code/webpack.go b/core/code/webpack.go index 640cd272..818c376f 100644 --- a/core/code/webpack.go +++ b/core/code/webpack.go @@ -87,13 +87,13 @@ func _webpack_cache(m *ice.Message, dir string, write bool) { p := value[nfs.PATH] switch kit.Ext(p) { case nfs.CSS: - _webpack_css(m, css, js, path.Join(ice.REQUIRE, ice.NODE_MODULES, ice.LIB, p)) + _webpack_css(m, css, js, path.Join(ice.REQUIRE, ice.LIB, ice.NODE_MODULES, p)) return case nfs.JS: default: p = p + "/lib/" + p + ".js" } - _webpack_node(m, js, path.Join(ice.REQUIRE, ice.NODE_MODULES, ice.LIB, p)) + _webpack_node(m, js, path.Join(ice.REQUIRE, ice.LIB, ice.NODE_MODULES, p)) }) } func _webpack_build(m *ice.Message, file string) { diff --git a/core/wiki/title.go b/core/wiki/title.go index 7a15abaa..2688f74c 100644 --- a/core/wiki/title.go +++ b/core/wiki/title.go @@ -24,17 +24,17 @@ func _title_show(m *ice.Message, kind, text string, arg ...string) { case NAVMENU: // 导航目录 _option(m, kind, "", text, arg...) data := _title_parse(m, path.Dir(m.Option(ice.MSG_SCRIPT)), text) - m.RenderTemplate(kit.Format("
", data)) + m.RenderTemplate(kit.Format("
", data), &Message{m}) return case PREMENU: // 前置目录 _option(m, kind, "", "", arg...) - m.RenderTemplate(m.Config(kind)) + m.RenderTemplate(m.Config(kind), &Message{m}) return case ENDMENU: // 后置目录 _option(m, kind, "", "", arg...) - m.RenderTemplate(m.Config(kind)) + m.RenderTemplate(m.Config(kind), &Message{m}) return case SECTION: // 分节标题