diff --git a/base/web/dream.go b/base/web/dream.go index f9e125f8..be40371e 100644 --- a/base/web/dream.go +++ b/base/web/dream.go @@ -152,11 +152,13 @@ func init() { } }) }) - for _, cmd := range kit.Reverse(kit.Split(mdb.Config(m, html.BUTTON))) { - m.Cmd(gdb.EVENT, gdb.LISTEN, gdb.EVENT, DREAM_TABLES, ice.CMD, cmd) - m.Cmd(gdb.EVENT, gdb.LISTEN, gdb.EVENT, DREAM_ACTION, ice.CMD, cmd) - } - aaa.White(m, kit.Keys(m.PrefixKey(), ctx.ACTION, DREAM_ACTION, ctx.RUN)) + m.GoSleep("1s", func() { + for _, cmd := range kit.Reverse(kit.Split(mdb.Config(m, html.BUTTON))) { + m.Cmd(gdb.EVENT, gdb.LISTEN, gdb.EVENT, DREAM_TABLES, ice.CMD, cmd) + m.Cmd(gdb.EVENT, gdb.LISTEN, gdb.EVENT, DREAM_ACTION, ice.CMD, cmd) + } + aaa.White(m, kit.Keys(m.PrefixKey(), ctx.ACTION, DREAM_ACTION, ctx.RUN)) + }) }}, html.BUTTON: {Hand: func(m *ice.Message, arg ...string) { mdb.Config(m, html.BUTTON, kit.Join(arg)) }}, mdb.SEARCH: {Hand: func(m *ice.Message, arg ...string) { diff --git a/core/chat/chat.go b/core/chat/chat.go index 5da64230..c8effaf7 100644 --- a/core/chat/chat.go +++ b/core/chat/chat.go @@ -10,6 +10,6 @@ const CHAT = "chat" var Index = &ice.Context{Name: CHAT, Help: "聊天中心"} -func init() { web.Index.Register(Index, &web.Frame{}, HEADER, FAVOR) } +func init() { web.Index.Register(Index, &web.Frame{}, HEADER, IFRAME, FAVOR) } func Prefix(arg ...string) string { return web.Prefix(CHAT, kit.Keys(arg)) } diff --git a/core/chat/header.go b/core/chat/header.go index 0f28f866..efc7d5cf 100644 --- a/core/chat/header.go +++ b/core/chat/header.go @@ -112,7 +112,6 @@ func init() { }}, }, web.ApiAction(), mdb.ImportantHashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,name,icons,type,link,order,space,index,args")), Hand: func(m *ice.Message, arg ...string) { kit.If(m.Option(ice.MSG_USERPOD), func(p string) { m.Option(ice.MSG_NODETYPE, m.Cmdx(web.SPACE, p, cli.RUNTIME, ice.MSG_NODETYPE)) }) - m.Debug("what %v", m.Option(ice.MSG_NODETYPE)) m.Option("language.list", m.Cmd(nfs.DIR, nfs.TemplatePath(m, aaa.LANGUAGE)+nfs.PS, nfs.FILE).Appendv(nfs.FILE)) m.Option("theme.list", m.Cmd(nfs.DIR, nfs.TemplatePath(m, aaa.THEME)+nfs.PS, nfs.FILE).Appendv(nfs.FILE)) m.Option(nfs.REPOS, m.Cmdv(web.SPIDE, nfs.REPOS, web.CLIENT_URL)) diff --git a/core/code/autogen.go b/core/code/autogen.go index c81b083b..840dcbf5 100644 --- a/core/code/autogen.go +++ b/core/code/autogen.go @@ -94,7 +94,8 @@ func _autogen_git(m *ice.Message, arg ...string) ice.Map { return kit.Dict(arg, aaa.USERNAME, m.Option(ice.MSG_USERNAME), tcp.HOSTNAME, ice.Info.Hostname, nfs.PATH, kit.Path("")+nfs.PS, mdb.TIME, m.Time(), GIT, GitVersion(m), GO, GoVersion(m), nfs.MODULE, _autogen_mod(m, ice.GO_MOD), msg.AppendSimple("remote,branch,version,forword,author,email,hash,when,message"), - web.DOMAIN, strings.ReplaceAll(tcp.PublishLocalhost(m, m.Option(ice.MSG_USERWEB)), "%2F", nfs.PS), + // web.DOMAIN, strings.ReplaceAll(tcp.PublishLocalhost(m, m.Option(ice.MSG_USERWEB)), "%2F", nfs.PS), + web.DOMAIN, m.Spawn(kit.Dict(ice.MSG_USERWEB, m.Option(ice.MSG_USERHOST), ice.MSG_USERPOD, m.Option(ice.MSG_USERPOD))).MergePod(""), cli.SYSTEM, ice.Info.System, ) } diff --git a/core/code/compile.go b/core/code/compile.go index c53eeb1d..80bf5ece 100644 --- a/core/code/compile.go +++ b/core/code/compile.go @@ -105,10 +105,8 @@ func init() { m.Cmdy(INSTALL, web.DOWNLOAD, kit.Format("%s/go%s.%s-%s.%s", m.Option(SERVICE), m.Option(VERSION), runtime.GOOS, runtime.GOARCH, kit.Select("tar.gz", "zip", runtime.GOOS == cli.WINDOWS)), ice.USR_LOCAL) }}, web.DREAM_TABLES: {Hand: func(m *ice.Message, arg ...string) { - kit.If(m.Option(mdb.TYPE) == web.WORKER, func() { - kit.If(nfs.Exists(m, path.Join(ice.USR_LOCAL_WORK, m.Option(mdb.NAME), ice.SRC_MAIN_GO)), func() { - kit.If(cli.SystemFind(m, GO), func() { m.PushButton(kit.Dict(m.CommandKey(), "构建")) }) - }) + kit.If(m.Option(mdb.TYPE) == web.WORKER && nfs.Exists(m, path.Join(ice.USR_LOCAL_WORK, m.Option(mdb.NAME), ice.SRC_MAIN_GO)), func() { + kit.If(cli.SystemFind(m, GO), func() { m.PushButton(kit.Dict(m.CommandKey(), "构建")) }) }) }}, web.DREAM_ACTION: {Hand: func(m *ice.Message, arg ...string) { web.DreamProcess(m, nil, arg...) }}, diff --git a/core/code/upgrade.go b/core/code/upgrade.go index 7ad29207..24c66ef4 100644 --- a/core/code/upgrade.go +++ b/core/code/upgrade.go @@ -42,9 +42,7 @@ func init() { m.Option(ice.EXIT, ice.TRUE) } uri := "/publish/" + kit.Format(value[nfs.FILE]) - kit.If(os.Getenv(cli.CTX_POD), func(p string) { - uri = kit.MergeURL2(os.Getenv(cli.CTX_DEV), web.S(p), cli.GOOS, runtime.GOOS, cli.GOARCH, runtime.GOARCH) - }) + kit.If(m.Spawn().ParseLink(ice.Info.Domain).Option(ice.MSG_USERPOD), func(p string) { uri = kit.MergeURL(uri, ice.POD, p) }) dir := path.Join(kit.Format(value[nfs.PATH]), kit.Format(value[nfs.FILE])) web.GoToast(m, m.PrefixKey(), func(toast func(name string, count, total int)) []string { switch web.SpideSave(m, dir, uri, func(count, total, value int) {