mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
Compare commits
No commits in common. "master" and "v1.9.73" have entirely different histories.
@ -149,15 +149,16 @@ const (
|
|||||||
)
|
)
|
||||||
const (
|
const (
|
||||||
CTX_SHY = "ctx_shy"
|
CTX_SHY = "ctx_shy"
|
||||||
CTX_DEV = "ctx_dev"
|
CTX_WEB = "ctx_web"
|
||||||
|
CTX_GIT = "ctx_git"
|
||||||
CTX_DEV_IP = "ctx_dev_ip"
|
CTX_DEV_IP = "ctx_dev_ip"
|
||||||
|
CTX_DEV = "ctx_dev"
|
||||||
CTX_OPS = "ctx_ops"
|
CTX_OPS = "ctx_ops"
|
||||||
CTX_REPOS = "ctx_repos"
|
CTX_REPOS = "ctx_repos"
|
||||||
CTX_NAME = "ctx_name"
|
CTX_NAME = "ctx_name"
|
||||||
CTX_DEMO = "ctx_demo"
|
CTX_DEMO = "ctx_demo"
|
||||||
CTX_MAIL = "ctx_mail"
|
CTX_MAIL = "ctx_mail"
|
||||||
CTX_ROOT = "ctx_root"
|
CTX_ROOT = "ctx_root"
|
||||||
CTX_DOMAIN = "ctx_domain"
|
|
||||||
|
|
||||||
CTX_PID = "ctx_pid"
|
CTX_PID = "ctx_pid"
|
||||||
CTX_LOG = "ctx_log"
|
CTX_LOG = "ctx_log"
|
||||||
|
@ -5,7 +5,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/aaa"
|
"shylinux.com/x/icebergs/base/aaa"
|
||||||
@ -190,12 +189,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
func UploadSave(m *ice.Message, p string) string {
|
|
||||||
up := kit.Simple(m.Optionv(ice.MSG_UPLOAD))
|
|
||||||
kit.If(strings.HasSuffix(p, nfs.PS), func() { p = path.Join(p, up[1]) })
|
|
||||||
m.Cmd(CACHE, WATCH, up[0], p)
|
|
||||||
return p
|
|
||||||
}
|
|
||||||
func Upload(m *ice.Message) []string {
|
func Upload(m *ice.Message) []string {
|
||||||
if up := kit.Simple(m.Optionv(ice.MSG_UPLOAD)); len(up) == 1 {
|
if up := kit.Simple(m.Optionv(ice.MSG_UPLOAD)); len(up) == 1 {
|
||||||
msg := m.Cmd(CACHE, UPLOAD)
|
msg := m.Cmd(CACHE, UPLOAD)
|
||||||
|
@ -174,8 +174,7 @@ func _dream_binary(m *ice.Message, p string) {
|
|||||||
if bin := path.Join(m.Option(cli.CMD_DIR), ice.BIN_ICE_BIN); nfs.Exists(m, bin) {
|
if bin := path.Join(m.Option(cli.CMD_DIR), ice.BIN_ICE_BIN); nfs.Exists(m, bin) {
|
||||||
return
|
return
|
||||||
} else if kit.IsUrl(p) || strings.HasPrefix(p, S()) {
|
} else if kit.IsUrl(p) || strings.HasPrefix(p, S()) {
|
||||||
// m.Cmd(DREAM, DOWNLOAD, bin, kit.MergeURL2(p, kit.Format("/publish/ice.%s.%s", runtime.GOOS, runtime.GOARCH), ice.POD, m.Option(mdb.NAME)))
|
m.Cmd(DREAM, DOWNLOAD, bin, kit.MergeURL2(p, kit.Format("/publish/ice.%s.%s", runtime.GOOS, runtime.GOARCH), ice.POD, m.Option(mdb.NAME)))
|
||||||
m.Cmd(DREAM, DOWNLOAD, bin, kit.MergeURL(p, cli.GOOS, runtime.GOOS, cli.GOARCH, runtime.GOARCH))
|
|
||||||
} else {
|
} else {
|
||||||
m.Cmd(nfs.LINK, bin, kit.Path(p))
|
m.Cmd(nfs.LINK, bin, kit.Path(p))
|
||||||
}
|
}
|
||||||
@ -371,12 +370,12 @@ func init() {
|
|||||||
}},
|
}},
|
||||||
SETTOKEN: {Name: "settoken nodename* username*", Help: "令牌", Style: html.DANGER, Hand: func(m *ice.Message, arg ...string) {
|
SETTOKEN: {Name: "settoken nodename* username*", Help: "令牌", Style: html.DANGER, Hand: func(m *ice.Message, arg ...string) {
|
||||||
token := m.Cmdx(TOKEN, mdb.CREATE, mdb.TYPE, SERVER, mdb.NAME, m.Option(aaa.USERNAME), mdb.TEXT, m.Option(tcp.NODENAME))
|
token := m.Cmdx(TOKEN, mdb.CREATE, mdb.TYPE, SERVER, mdb.NAME, m.Option(aaa.USERNAME), mdb.TEXT, m.Option(tcp.NODENAME))
|
||||||
m.Cmd(SPACE, m.Option(mdb.NAME), SPIDE, DEV_CREATE_TOKEN, ice.Maps{TOKEN: token})
|
m.Cmd(SPACE, m.Option(mdb.NAME), SPIDE, DEV_CREATE_TOKEN, ice.Maps{CLIENT_NAME: ice.DEV, TOKEN: token})
|
||||||
}},
|
}},
|
||||||
GETTOKEN: {Help: "令牌", Style: html.DANGER, Hand: func(m *ice.Message, arg ...string) {
|
GETTOKEN: {Help: "令牌", Style: html.DANGER, Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Options(m.Cmd(SPIDE, m.Option(mdb.NAME)).AppendSimple()).Cmdy(SPIDE, mdb.DEV_REQUEST)
|
m.Options(m.Cmd(SPIDE, m.Option(mdb.NAME)).AppendSimple()).Cmdy(SPIDE, mdb.DEV_REQUEST)
|
||||||
}},
|
}},
|
||||||
GRANT: {Name: "grant username", Role: aaa.VOID, Hand: func(m *ice.Message, arg ...string) {
|
GRANT: {Name: "grant username", Hand: func(m *ice.Message, arg ...string) {
|
||||||
if aaa.IsTechOrRoot(m) && m.Option(aaa.USERNAME) != "" {
|
if aaa.IsTechOrRoot(m) && m.Option(aaa.USERNAME) != "" {
|
||||||
m.Option(ice.MSG_USERNAME, m.Option(aaa.USERNAME))
|
m.Option(ice.MSG_USERNAME, m.Option(aaa.USERNAME))
|
||||||
}
|
}
|
||||||
@ -507,8 +506,7 @@ func init() {
|
|||||||
m.Sort("type,status,name", []string{aaa.LOGIN, WORKER, SERVER, ORIGIN}, []string{cli.START, cli.STOP, cli.BEGIN}, ice.STR_R)
|
m.Sort("type,status,name", []string{aaa.LOGIN, WORKER, SERVER, ORIGIN}, []string{cli.START, cli.STOP, cli.BEGIN}, ice.STR_R)
|
||||||
m.StatusTimeCountStats(mdb.TYPE, mdb.STATUS)
|
m.StatusTimeCountStats(mdb.TYPE, mdb.STATUS)
|
||||||
} else if arg[0] == ctx.ACTION {
|
} else if arg[0] == ctx.ACTION {
|
||||||
m.Cmdy(arg[1], DREAM_ACTION, arg)
|
gdb.Event(m, DREAM_ACTION, arg)
|
||||||
// gdb.Event(m, DREAM_ACTION, arg)
|
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
|
@ -84,7 +84,6 @@ func Render(m *ice.Message, cmd string, args ...ice.Any) bool {
|
|||||||
"$output", fieldset+">div.output",
|
"$output", fieldset+">div.output",
|
||||||
"$status", fieldset+">div.status",
|
"$status", fieldset+">div.status",
|
||||||
"$fieldset", fieldset,
|
"$fieldset", fieldset,
|
||||||
"$body", "body.cmd."+m.Option(ctx.INDEX),
|
|
||||||
"$index", m.Option(ctx.INDEX),
|
"$index", m.Option(ctx.INDEX),
|
||||||
"$input", "body>div.input.float."+m.Option(ctx.INDEX),
|
"$input", "body>div.input.float."+m.Option(ctx.INDEX),
|
||||||
)))
|
)))
|
||||||
@ -172,7 +171,7 @@ func RenderPodCmd(m *ice.Message, pod, cmd string, arg ...ice.Any) {
|
|||||||
m.Option(mdb.ICONS, msg.Option(ice.MSG_NODEICON))
|
m.Option(mdb.ICONS, msg.Option(ice.MSG_NODEICON))
|
||||||
}
|
}
|
||||||
m.OptionDefault(mdb.ICONS, m.Resource(kit.Select(ice.Info.NodeIcon, msg.Option(ice.MSG_NODEICON), msg.Append(mdb.ICONS))))
|
m.OptionDefault(mdb.ICONS, m.Resource(kit.Select(ice.Info.NodeIcon, msg.Option(ice.MSG_NODEICON), msg.Append(mdb.ICONS))))
|
||||||
serve := strings.Split(UserHost(m), "://")[1]
|
serve := kit.Select("localhost:9020", UserWeb(m).Host)
|
||||||
pod = kit.Select(pod, msg.Option(ice.MSG_NODENAME), m.Option(ice.MSG_USERPOD) != "")
|
pod = kit.Select(pod, msg.Option(ice.MSG_NODENAME), m.Option(ice.MSG_USERPOD) != "")
|
||||||
m.OptionDefault(TITLE, kit.Select(cmd, msg.Append(mdb.HELP), !m.IsEnglish())+" "+kit.Select(serve, pod))
|
m.OptionDefault(TITLE, kit.Select(cmd, msg.Append(mdb.HELP), !m.IsEnglish())+" "+kit.Select(serve, pod))
|
||||||
RenderCmds(m, kit.Dict(msg.AppendSimple(), ctx.ARGS, kit.Simple(arg), ctx.DISPLAY, m.Option(ice.MSG_DISPLAY)))
|
RenderCmds(m, kit.Dict(msg.AppendSimple(), ctx.ARGS, kit.Simple(arg), ctx.DISPLAY, m.Option(ice.MSG_DISPLAY)))
|
||||||
|
@ -311,6 +311,7 @@ func init() {
|
|||||||
m.Cmd("", mdb.CREATE, kit.Select(dev, os.Getenv("ctx_dev_ip")), ice.DEV_IP, ice.SRC_MAIN_ICO, "dev_ip")
|
m.Cmd("", mdb.CREATE, kit.Select(dev, os.Getenv("ctx_dev_ip")), ice.DEV_IP, ice.SRC_MAIN_ICO, "dev_ip")
|
||||||
m.Cmd("", mdb.CREATE, kit.Select("http://localhost:9020", conf[cli.CTX_OPS]), ice.OPS, ice.SRC_MAIN_ICO, nfs.REPOS)
|
m.Cmd("", mdb.CREATE, kit.Select("http://localhost:9020", conf[cli.CTX_OPS]), ice.OPS, ice.SRC_MAIN_ICO, nfs.REPOS)
|
||||||
m.Cmd("", mdb.CREATE, kit.Select("https://shylinux.com", conf[cli.CTX_SHY]), ice.SHY, ice.SRC_MAIN_ICO, nfs.REPOS)
|
m.Cmd("", mdb.CREATE, kit.Select("https://shylinux.com", conf[cli.CTX_SHY]), ice.SHY, ice.SRC_MAIN_ICO, nfs.REPOS)
|
||||||
|
m.Cmd("", mdb.CREATE, kit.Select("https://web.shylinux.com", conf[cli.CTX_WEB]), ice.WEB, ice.SRC_MAIN_ICO, nfs.REPOS)
|
||||||
m.Cmd("", mdb.CREATE, kit.Select("https://mail.shylinux.com", conf[cli.CTX_MAIL]), ice.MAIL, "usr/icons/Mail.png", "mail")
|
m.Cmd("", mdb.CREATE, kit.Select("https://mail.shylinux.com", conf[cli.CTX_MAIL]), ice.MAIL, "usr/icons/Mail.png", "mail")
|
||||||
m.Cmd("", mdb.CREATE, kit.Select("https://demo.shylinux.com", conf[cli.CTX_DEMO]), ice.DEMO, ice.SRC_MAIN_ICO, "demo")
|
m.Cmd("", mdb.CREATE, kit.Select("https://demo.shylinux.com", conf[cli.CTX_DEMO]), ice.DEMO, ice.SRC_MAIN_ICO, "demo")
|
||||||
m.Cmd("", mdb.CREATE, "https://2023.shylinux.com", "2023-ContextOS", ice.SRC_MAIN_ICO, nfs.REPOS)
|
m.Cmd("", mdb.CREATE, "https://2023.shylinux.com", "2023-ContextOS", ice.SRC_MAIN_ICO, nfs.REPOS)
|
||||||
@ -388,7 +389,7 @@ func init() {
|
|||||||
mdb.HashModify(m, mdb.NAME, m.Option(CLIENT_NAME), TOKEN, "")
|
mdb.HashModify(m, mdb.NAME, m.Option(CLIENT_NAME), TOKEN, "")
|
||||||
}},
|
}},
|
||||||
DEV_CREATE_TOKEN: {Hand: func(m *ice.Message, arg ...string) {
|
DEV_CREATE_TOKEN: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.OptionDefault(CLIENT_NAME, m.Option(ice.FROM_SPACE))
|
m.Option(CLIENT_NAME, m.Option(ice.FROM_SPACE))
|
||||||
mdb.HashModify(m, m.OptionSimple(CLIENT_NAME, TOKEN))
|
mdb.HashModify(m, m.OptionSimple(CLIENT_NAME, TOKEN))
|
||||||
m.Cmd(SPACE, tcp.DIAL, m.Option(CLIENT_NAME)).Sleep300ms()
|
m.Cmd(SPACE, tcp.DIAL, m.Option(CLIENT_NAME)).Sleep300ms()
|
||||||
}},
|
}},
|
||||||
@ -431,17 +432,8 @@ func init() {
|
|||||||
return kit.Format(mdb.Cache(ice.Pulse, p, func() ice.Any { return m.Cmdx(SPIDE, ice.OPS, SPIDE_RAW, http.MethodGet, p) }))
|
return kit.Format(mdb.Cache(ice.Pulse, p, func() ice.Any { return m.Cmdx(SPIDE, ice.OPS, SPIDE_RAW, http.MethodGet, p) }))
|
||||||
} else if p == "" {
|
} else if p == "" {
|
||||||
return ""
|
return ""
|
||||||
} else if nfs.Exists(m, p) {
|
|
||||||
return m.Cmdx(nfs.CAT, p)
|
|
||||||
} else if strings.Contains(p, "/pkg/mod/") {
|
|
||||||
ls := strings.Split(p, "/pkg/mod/")
|
|
||||||
return kit.Format(mdb.Cache(ice.Pulse, p, func() ice.Any { return m.Cmdx(SPIDE, ice.OPS, SPIDE_RAW, http.MethodGet, nfs.REQUIRE+ls[1]) }))
|
|
||||||
} else if strings.Contains(p, "/usr/local/work/") {
|
|
||||||
ls := strings.Split(strings.Split(p, "/usr/local/work/")[1], "/src/")
|
|
||||||
pp := kit.MergeURL2(ice.Info.Make.Domain, "/p/src/"+ls[1]+"?pod="+ls[0])
|
|
||||||
return kit.Format(mdb.Cache(ice.Pulse, p, func() ice.Any { return m.Cmdx(SPIDE, ice.OPS, SPIDE_RAW, http.MethodGet, pp) }))
|
|
||||||
} else {
|
} else {
|
||||||
return ""
|
return m.Cmdx(nfs.CAT, p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nfs.TemplatePath = func(m *ice.Message, arg ...string) string {
|
nfs.TemplatePath = func(m *ice.Message, arg ...string) string {
|
||||||
|
@ -164,12 +164,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
m.Option(aaa.LANGUAGE, strings.ReplaceAll(strings.ToLower(kit.Select("", kit.Split(kit.GetValid(
|
m.Option(aaa.LANGUAGE, strings.ReplaceAll(strings.ToLower(kit.Select("", kit.Split(kit.GetValid(
|
||||||
func() string { return kit.Select("", "zh-cn", strings.Contains(m.Option(ice.MSG_USERUA), "zh_CN")) },
|
func() string { return kit.Select("", "zh-cn", strings.Contains(m.Option(ice.MSG_USERUA), "zh_CN")) },
|
||||||
func() string {
|
func() string { return kit.Select("", kit.Split(m.R.Header.Get(html.AcceptLanguage), ",;"), 0) },
|
||||||
if m.R != nil {
|
|
||||||
return kit.Select("", kit.Split(m.R.Header.Get(html.AcceptLanguage), ",;"), 0)
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
},
|
|
||||||
func() string { return ice.Info.Lang },
|
func() string { return ice.Info.Lang },
|
||||||
), " ."), 0)), "_", "-"))
|
), " ."), 0)), "_", "-"))
|
||||||
m.Option("language.list", m.Cmd(nfs.DIR, nfs.TemplatePath(m, aaa.LANGUAGE)+nfs.PS, nfs.FILE).Appendv(nfs.FILE))
|
m.Option("language.list", m.Cmd(nfs.DIR, nfs.TemplatePath(m, aaa.LANGUAGE)+nfs.PS, nfs.FILE).Appendv(nfs.FILE))
|
||||||
|
@ -6,7 +6,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
can.sup.onexport.link = function() { return can.misc.MergeURL(can, {pod: can.ConfSpace()||can.misc.Search(can, ice.POD), cmd: web.DESKTOP}) }
|
can.sup.onexport.link = function() { return can.misc.MergeURL(can, {pod: can.ConfSpace()||can.misc.Search(can, ice.POD), cmd: web.DESKTOP}) }
|
||||||
can.onexport.title(can, can.ConfHelp(), can.user.titles)
|
can.onexport.title(can, can.ConfHelp(), can.user.titles)
|
||||||
},
|
},
|
||||||
_menu: function(can) { can.onappend.plugin(can, {index: "web.chat.macos.menu", style: html.OUTPUT, title: can.Conf("title")}, function(sub) { can.ui.menu = sub, sub._desktop = can
|
_menu: function(can) { can.onappend.plugin(can, {index: "web.chat.macos.menu", style: html.OUTPUT}, function(sub) { can.ui.menu = sub, sub._desktop = can
|
||||||
var tabs = can.misc.sessionStorage(can, [can.ConfIndex(), html.TABS])
|
var tabs = can.misc.sessionStorage(can, [can.ConfIndex(), html.TABS])
|
||||||
sub.onexport.output = function() { can.onimport._desktop(can, can._msg)
|
sub.onexport.output = function() { can.onimport._desktop(can, can._msg)
|
||||||
var sess = can.misc.SearchHash(can)[0]||can.Conf("session")
|
var sess = can.misc.SearchHash(can)[0]||can.Conf("session")
|
||||||
|
@ -8,7 +8,6 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg) { can.page.style(can, can._ou
|
|||||||
{view: [[html.MENU, html.TITLE]], list: [
|
{view: [[html.MENU, html.TITLE]], list: [
|
||||||
{img: can.misc.ResourceFavicon(can, msg.Option(html.FAVICON), can.ConfSpace())},
|
{img: can.misc.ResourceFavicon(can, msg.Option(html.FAVICON), can.ConfSpace())},
|
||||||
{text: decodeURIComponent(
|
{text: decodeURIComponent(
|
||||||
can.Conf("title")||
|
|
||||||
(window == top? can.user.info.titles: "")||can.ConfSpace()||can.misc.Search(can, ice.POD)||location.host
|
(window == top? can.user.info.titles: "")||can.ConfSpace()||can.misc.Search(can, ice.POD)||location.host
|
||||||
)},
|
)},
|
||||||
], onclick: function(event) { can.sup.onexport.record(can, html.DESKTOP) }},
|
], onclick: function(event) { can.sup.onexport.record(can, html.DESKTOP) }},
|
||||||
|
@ -74,7 +74,7 @@ func _go_show(m *ice.Message, arg ...string) {
|
|||||||
// ctx.ProcessField(m, "web.code.xterm", kit.Simple())
|
// ctx.ProcessField(m, "web.code.xterm", kit.Simple())
|
||||||
ctx.ProcessField(m, "log.debug", kit.Simple("bench"))
|
ctx.ProcessField(m, "log.debug", kit.Simple("bench"))
|
||||||
} else if cmd := ctx.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
|
} else if cmd := ctx.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
|
||||||
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); path.Base(arg[1]) != "portal.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],
|
!kit.IsIn(arg[1],
|
||||||
"gonganxitong/user.go",
|
"gonganxitong/user.go",
|
||||||
"gonganxitong/sess.go",
|
"gonganxitong/sess.go",
|
||||||
@ -82,8 +82,7 @@ func _go_show(m *ice.Message, arg ...string) {
|
|||||||
"gonganxitong/domain.go",
|
"gonganxitong/domain.go",
|
||||||
"gonganxitong/command.go",
|
"gonganxitong/command.go",
|
||||||
"gonganxitong/quotalist.go",
|
"gonganxitong/quotalist.go",
|
||||||
"operation/studio.go",
|
) {
|
||||||
) && nfs.Exists(m, p) {
|
|
||||||
if cmd := ctx.GetFileCmd(p); cmd != "" {
|
if cmd := ctx.GetFileCmd(p); cmd != "" {
|
||||||
if m.ActionKey() == mdb.RENDER {
|
if m.ActionKey() == mdb.RENDER {
|
||||||
ctx.ProcessField(m, cmd, kit.Simple())
|
ctx.ProcessField(m, cmd, kit.Simple())
|
||||||
@ -229,7 +228,7 @@ func TableName(model string) string {
|
|||||||
}
|
}
|
||||||
if kit.IsIn(model, "sms", "equipment") {
|
if kit.IsIn(model, "sms", "equipment") {
|
||||||
|
|
||||||
} else if kit.HasSuffix(model, "y") && !kit.HasSuffix(model, "way") {
|
} else if kit.HasSuffix(model, "y") {
|
||||||
model = model[:len(model)-1] + "ies"
|
model = model[:len(model)-1] + "ies"
|
||||||
} else if kit.HasSuffix(model, "s") {
|
} else if kit.HasSuffix(model, "s") {
|
||||||
if !kit.HasSuffix(model, "os") {
|
if !kit.HasSuffix(model, "os") {
|
||||||
|
@ -22,9 +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)
|
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 {
|
} else {
|
||||||
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); !kit.IsIn(arg[1],
|
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); nfs.Exists(m, p) {
|
||||||
"operation/studio.js",
|
|
||||||
) && nfs.Exists(m, p) {
|
|
||||||
if cmd := ctx.GetFileCmd(p); cmd != "" {
|
if cmd := ctx.GetFileCmd(p); cmd != "" {
|
||||||
ctx.ProcessField(m, cmd, kit.Simple())
|
ctx.ProcessField(m, cmd, kit.Simple())
|
||||||
return
|
return
|
||||||
|
@ -136,9 +136,6 @@ func init() {
|
|||||||
nfs.TRASH: {Hand: func(m *ice.Message, arg ...string) {
|
nfs.TRASH: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
nfs.Trash(m, arg[0])
|
nfs.Trash(m, arg[0])
|
||||||
}},
|
}},
|
||||||
web.UPLOAD: {Hand: func(m *ice.Message, arg ...string) {
|
|
||||||
web.UploadSave(m, path.Dir(path.Join(m.Option(nfs.PATH), m.Option(nfs.FILE)))+nfs.PS)
|
|
||||||
}},
|
|
||||||
nfs.SAVE: {Hand: func(m *ice.Message, arg ...string) {
|
nfs.SAVE: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
kit.If(m.Option(nfs.CONTENT) == "", func() { m.Option(nfs.CONTENT, m.Cmdx("", TEMPLATE)) })
|
kit.If(m.Option(nfs.CONTENT) == "", func() { m.Option(nfs.CONTENT, m.Cmdx("", TEMPLATE)) })
|
||||||
m.Cmd(nfs.SAVE, path.Join(m.Option(nfs.PATH), m.Option(nfs.FILE)))
|
m.Cmd(nfs.SAVE, path.Join(m.Option(nfs.PATH), m.Option(nfs.FILE)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user