forked from x/icebergs
add some
This commit is contained in:
parent
f310a782c4
commit
1757e0e524
@ -225,6 +225,9 @@ func init() {
|
||||
mdb.Config(m, ice.MAIN, C(m.Option(ctx.INDEX)))
|
||||
}
|
||||
}},
|
||||
mdb.ICONS: {Hand: func(m *ice.Message, arg ...string) {
|
||||
mdb.Config(m, mdb.ICONS, arg[0])
|
||||
}},
|
||||
tcp.HOST: {Help: "公网", Hand: func(m *ice.Message, arg ...string) { m.Echo(kit.Formats(PublicIP(m))) }},
|
||||
cli.SYSTEM: {Help: "系统", Hand: func(m *ice.Message, arg ...string) { cli.Opens(m, "System Settings.app") }},
|
||||
cli.START: {Name: "start dev proto host port=9020 nodename username usernick", Hand: func(m *ice.Message, arg ...string) {
|
||||
|
@ -283,7 +283,11 @@ func init() {
|
||||
"c": {Help: "命令", Actions: ApiWhiteAction(), Hand: func(m *ice.Message, arg ...string) { m.Cmdy(CHAT_CMD, arg) }},
|
||||
SPACE: {Name: "space name cmds auto", Help: "空间站", Actions: ice.MergeActions(ice.Actions{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { aaa.White(m, SPACE, ice.MAIN) }},
|
||||
mdb.ICONS: {Hand: func(m *ice.Message, arg ...string) { cli.NodeInfo(m, ice.Info.Pathname, WORKER, arg[0]) }},
|
||||
mdb.ICONS: {Hand: func(m *ice.Message, arg ...string) {
|
||||
cli.NodeInfo(m, ice.Info.Pathname, WORKER, arg[0])
|
||||
mdb.Config(m, mdb.ICONS, arg[0])
|
||||
m.Cmd(SERVE, m.ActionKey(), arg)
|
||||
}},
|
||||
ice.MAIN: {Name: "main index", Help: "首页", Hand: func(m *ice.Message, arg ...string) {
|
||||
if len(arg) > 0 {
|
||||
mdb.Config(m, ice.MAIN, m.Option(ctx.INDEX))
|
||||
|
@ -19,10 +19,7 @@ func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
POD: {Help: "空间", Actions: web.ApiWhiteAction(), Hand: func(m *ice.Message, arg ...string) {
|
||||
if m.IsCliUA() {
|
||||
if len(arg) > 1 {
|
||||
m.Option(ice.MSG_USERPOD, arg[0])
|
||||
m.Cmdy(web.SPACE, arg[0], arg[2], arg[3:])
|
||||
} else if len(arg) == 0 || arg[0] == "" {
|
||||
if len(arg) == 0 || arg[0] == "" {
|
||||
m.Option(ice.MSG_USERROLE, aaa.TECH)
|
||||
m.Cmd(web.SPACE, func(value ice.Maps) {
|
||||
msg := m.Cmd(nfs.DIR, path.Join(ice.USR_LOCAL_WORK, value[mdb.NAME], ice.USR_PUBLISH, kit.Keys(ice.ICE, m.OptionDefault(cli.GOOS, cli.LINUX), m.OptionDefault(cli.GOARCH, cli.AMD64))))
|
||||
@ -30,6 +27,9 @@ func init() {
|
||||
})
|
||||
m.Cut("name,size,time")
|
||||
m.RenderResult()
|
||||
} else if len(arg) > 1 {
|
||||
m.Option(ice.MSG_USERPOD, arg[0])
|
||||
m.Cmdy(web.SPACE, arg[0], arg[2], arg[3:])
|
||||
} else if strings.HasPrefix(m.Option(ice.MSG_USERUA), "git/") {
|
||||
m.RenderRedirect(kit.MergeURL2(m.Cmdv(web.SPACE, arg[0], web.CODE_GIT_REPOS, nfs.REMOTE, nfs.REMOTE), "/info/refs", m.OptionSimple("service")))
|
||||
} else if m.Option(cli.GOOS) != "" && m.Option(cli.GOARCH) != "" {
|
||||
@ -49,6 +49,7 @@ func init() {
|
||||
if kit.IsIn(arg[2], web.ADMIN) {
|
||||
m.Cmdy(web.SPACE, arg[0], arg[2], arg[3:])
|
||||
} else {
|
||||
m.Options(m.Cmd(web.SPACE, arg[0]).AppendSimple())
|
||||
web.RenderPodCmd(m, arg[0], arg[2], arg[3:])
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user