forked from x/icebergs
add some
This commit is contained in:
parent
8f10a46fb5
commit
e042dc832c
@ -74,19 +74,24 @@ func _go_show(m *ice.Message, arg ...string) {
|
||||
// ctx.ProcessField(m, "web.code.xterm", kit.Simple())
|
||||
ctx.ProcessField(m, "log.debug", kit.Simple("bench"))
|
||||
} else if cmd := ctx.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
|
||||
if p := path.Join(path.Dir(path.Join(arg[2], arg[1])), "portal.go"); path.Base(arg[1]) != "portal.go" && nfs.Exists(m, p) &&
|
||||
!kit.IsIn(arg[1], "gonganxitong/user.go", "gonganxitong/domain.go") {
|
||||
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); path.Base(arg[1]) != "portal.go" && nfs.Exists(m, p) &&
|
||||
!kit.IsIn(arg[1],
|
||||
"gonganxitong/user.go",
|
||||
"gonganxitong/domain.go",
|
||||
"gonganxitong/command.go",
|
||||
) {
|
||||
if cmd := ctx.GetFileCmd(p); cmd != "" {
|
||||
if m.ActionKey() == mdb.RENDER {
|
||||
ctx.ProcessField(m, cmd, kit.Simple())
|
||||
} else {
|
||||
ls := kit.Split(strings.TrimSuffix(arg[1], ".go"), "/")
|
||||
if kit.HasSuffix(ls[1], "y") {
|
||||
ls[1] = ls[1][:len(ls[1])-1] + "ies"
|
||||
table := kit.Select("", ls, -1)
|
||||
if kit.HasSuffix(table, "y") {
|
||||
table = table[:len(table)-1] + "ies"
|
||||
} else {
|
||||
ls[1] = ls[1] + "s"
|
||||
table = table + "s"
|
||||
}
|
||||
ctx.ProcessField(m, "web.code.mysql.query", kit.Simple("mysql", ls[0], ls[1]))
|
||||
ctx.ProcessField(m, "web.code.mysql.query", kit.Simple("mysql", ls[0], table))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ func _js_show(m *ice.Message, arg ...string) {
|
||||
ctx.ProcessField(m, kit.Select(ice.CAN_PLUGIN, "web."+strings.Replace(strings.TrimSuffix(strings.TrimPrefix(arg[1], "plugin/local/"), nfs.PT+JS), nfs.PS, nfs.PT, -1)), nil)
|
||||
}
|
||||
} else {
|
||||
if p := path.Join(path.Dir(path.Join(arg[2], arg[1])), "portal.go"); nfs.Exists(m, p) {
|
||||
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); nfs.Exists(m, p) {
|
||||
if cmd := ctx.GetFileCmd(p); cmd != "" {
|
||||
ctx.ProcessField(m, cmd, kit.Simple())
|
||||
return
|
||||
|
@ -1,7 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
if (!can.user.info.username && can.user.info._cmd != "web.chat.oauth.client" && msg.Option("oauth")) {
|
||||
debugger
|
||||
return can.user.jumps(msg.Option("oauth"))
|
||||
}
|
||||
msg.Option(ice.MSG_ACTION, ""), can.require([msg.Option(nfs.SCRIPT)], function(can) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user