1
0
mirror of https://shylinux.com/x/icebergs synced 2025-05-03 20:07:01 +08:00
This commit is contained in:
harveyshao 2022-03-15 03:30:10 +08:00
parent 0f82c6ec19
commit e9253f9ac1
3 changed files with 7 additions and 3 deletions

View File

@ -25,7 +25,9 @@ func init() {
return // 节点列表
}
if len(arg) == 1 {
if s := m.Cmdx(web.SPACE, arg[0], nfs.CAT, "/page/index.html"); s != "" {
if s := m.Cmdx(web.SPACE, arg[0], "web.chat.website", "show", "index.iml", "Header", "", "River", "", "Action", "", "Footer", ""); s != "" {
m.RenderResult(s)
} else if s := m.Cmdx(web.SPACE, arg[0], nfs.CAT, "/page/index.html"); s != "" {
m.RenderResult(s)
} else {
m.RenderIndex(web.SERVE, ice.VOLCANOS)

View File

@ -36,7 +36,9 @@ func _website_parse(m *ice.Message, text string, args ...string) (map[string]int
), kit.Dict(), kit.Dict()
prefix := ""
m.Debug("what %v", prefix)
m.Cmd(lex.SPLIT, "", mdb.KEY, mdb.NAME, func(deep int, ls []string, meta map[string]interface{}) []string {
m.Debug("what %v", ls)
data := kit.Dict()
switch display := ice.DisplayRequire(1, ls[0])[ctx.DISPLAY]; kit.Ext(ls[0]) {
case nfs.JS:

View File

@ -71,7 +71,7 @@ func init() {
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
ice.Dump = func(w io.Writer, name string, cb func(string)) bool {
for _, key := range []string{name, strings.TrimPrefix(name, ice.USR_VOLCANOS)} {
if key == "/page/index.html" && kit.FileExists("src/website/index.iml") {
if key == "/page/index.html" && (kit.FileExists("src/website/index.iml") || len(ice.Info.Pack["src/website/index.iml"]) > 0) {
if s := m.Cmdx("web.chat.website", "show", "index.iml", "Header", "", "River", "", "Action", "", "Footer", ""); s != "" {
fmt.Fprint(w, s)
return true
@ -91,7 +91,7 @@ func init() {
if kit.FileExists(path.Join(ice.USR_VOLCANOS, ice.PROTO_JS)) {
m.Cmd(BINPACK, mdb.REMOVE)
}
if kit.FileExists("src/website/index.iml") {
if kit.FileExists("src/website/index.iml") || len(ice.Info.Pack["src/website/index.iml"]) > 0 {
if s := m.Cmdx("web.chat.website", "show", "index.iml", "Header", "", "River", "", "Action", "", "Footer", ""); s != "" {
ice.Info.Pack["/page/index.html"] = []byte(s)
}