1
0
forked from x/icebergs
This commit is contained in:
shaoying 2020-05-04 08:11:26 +08:00
parent 435d789045
commit 3c405bb008
2 changed files with 11 additions and 7 deletions

View File

@ -449,6 +449,8 @@ var Index = &ice.Context{Name: "web", Help: "网络模块",
Configs: map[string]*ice.Config{
ice.WEB_SPIDE: {Name: "spide", Help: "蜘蛛侠", Value: kit.Data(kit.MDB_SHORT, "client.name")},
ice.WEB_SERVE: {Name: "serve", Help: "服务器", Value: kit.Data(
"title", "github.com/shylinux/contexts",
"legal", `<a href="mailto:shylinuxc@gmail.com">shylinuxc@gmail.com</a>`,
"page", kit.Dict(
"index", "usr/volcanos/page/index.html",
"share", "usr/volcanos/page/share.html",
@ -458,7 +460,7 @@ var Index = &ice.Context{Name: "web", Help: "网络模块",
),
"volcanos", kit.Dict("path", "usr/volcanos", "branch", "master",
"repos", "https://github.com/shylinux/volcanos",
"require", "usr/local",
"require", ".ish/pluged",
"refresh", "5",
),
"template", kit.Dict("path", "usr/template", "list", []interface{}{
@ -488,7 +490,10 @@ var Index = &ice.Context{Name: "web", Help: "网络模块",
"head", kit.Data(kit.MDB_SHORT, "story"),
"mime", kit.Dict("md", "txt"),
)},
ice.WEB_SHARE: {Name: "share", Help: "共享链", Value: kit.Data("index", "usr/volcanos/share.html", "template", share_template)},
ice.WEB_SHARE: {Name: "share", Help: "共享链", Value: kit.Data(
"index", "usr/volcanos/share.html",
"template", share_template,
)},
ice.WEB_ROUTE: {Name: "route", Help: "路由", Value: kit.Data(kit.MDB_SHORT, kit.MDB_NAME)},
ice.WEB_PROXY: {Name: "proxy", Help: "代理", Value: kit.Data(kit.MDB_SHORT, "proxy")},

View File

@ -308,7 +308,7 @@ var Index = &ice.Context{Name: "chat", Help: "聊天中心",
}},
"/storm": {Name: "/storm", Help: "暴风雨", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if m.Warn(m.Option(ice.MSG_RIVER) == "", "not join") {
m.Render("status", 402, "not join")
// m.Render("status", 402, "not join")
return
}
@ -404,18 +404,17 @@ var Index = &ice.Context{Name: "chat", Help: "聊天中心",
}},
"/header": {Name: "/header", Help: "标题栏", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
m.Echo(m.Conf(ice.WEB_SHARE, "meta.repos"))
m.Echo(m.Conf(ice.WEB_SERVE, "meta.title"))
}},
"/footer": {Name: "/footer", Help: "状态栏", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
m.Echo(m.Conf(ice.WEB_SHARE, "meta.email"))
m.Echo(m.Conf(ice.WEB_SHARE, "meta.legal"))
m.Echo(m.Conf(ice.WEB_SERVE, "meta.legal"))
}},
"/target": {Name: "/target", Help: "对话框", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {}},
"/source": {Name: "/source", Help: "输入框", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {}},
"/action": {Name: "/action", Help: "工作台", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
if m.Warn(m.Option(ice.MSG_RIVER) == "" || m.Option(ice.MSG_STORM) == "", "not join") {
m.Render("status", 402, "not join")
// m.Render("status", 402, "not join")
return
}