diff --git a/base/web/render.go b/base/web/render.go
index b85af82d..65e7e1f0 100644
--- a/base/web/render.go
+++ b/base/web/render.go
@@ -103,7 +103,7 @@ type Buffer struct {
}
func (b *Buffer) Write(buf []byte) (int, error) {
- b.m.Cmd(SPACE, b.n, "grow", string(buf))
+ b.m.PushNoticeGrow(string(buf))
return len(buf), nil
}
func (b *Buffer) Close() error { return nil }
diff --git a/base/web/share.go b/base/web/share.go
index ed1a9be2..19188aab 100644
--- a/base/web/share.go
+++ b/base/web/share.go
@@ -158,6 +158,10 @@ func init() {
m.RenderIndex(SERVE, ice.VOLCANOS)
}},
+ "/share/toast/": {Name: "/share/toast/", Help: "推送流", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
+ m.Cmdy(SPACE, m.Option("pod"), m.Optionv("cmds"))
+
+ }},
"/share/repos/": {Name: "/share/repos/", Help: "代码库", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
_share_repos(m, path.Join(arg[0], arg[1], arg[2]), arg[3:]...)
}},
diff --git a/conf.go b/conf.go
index 7f4e9d3c..3771df43 100644
--- a/conf.go
+++ b/conf.go
@@ -81,6 +81,7 @@ const ( // DIR
USR_ICEBERGS = "usr/icebergs"
USR_TOOLKITS = "usr/toolkits"
USR_INTSHELL = "usr/intshell"
+ USR_RELEASE = "usr/release"
USR_INSTALL = "usr/install"
USR_PUBLISH = "usr/publish"
diff --git a/core/code/install.go b/core/code/install.go
index b3bcf287..92b80b83 100644
--- a/core/code/install.go
+++ b/core/code/install.go
@@ -90,7 +90,7 @@ func _install_build(m *ice.Message, arg ...string) {
m.Toast(ice.SUCCESS, cli.BUILD)
}
func _install_order(m *ice.Message, arg ...string) {
- p := kit.Path(m.Config(kit.MDB_PATH), kit.TrimExt(m.Option(kit.MDB_LINK)), m.Option(kit.MDB_PATH)+ice.NL)
+ p := path.Join(m.Config(kit.MDB_PATH), kit.TrimExt(m.Option(kit.MDB_LINK)), m.Option(kit.MDB_PATH)+ice.NL)
if !strings.Contains(m.Cmdx(nfs.CAT, ice.ETC_PATH), p) {
m.Cmd(nfs.PUSH, ice.ETC_PATH, p)
}
diff --git a/core/code/vimer.go b/core/code/vimer.go
index 5089e6de..3e774991 100644
--- a/core/code/vimer.go
+++ b/core/code/vimer.go
@@ -52,6 +52,7 @@ func init() {
BINPACK: {Name: "binpack", Help: "打包", Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(AUTOGEN, BINPACK)
m.Cmd(nfs.COPY, ice.GO_MOD, path.Join(ice.SRC_RELEASE, ice.GO_MOD))
+ m.Cmd(nfs.COPY, path.Join(ice.USR_RELEASE, "conf.go"), path.Join(ice.USR_ICEBERGS, "conf.go"))
m.ProcessInner()
}},
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
diff --git a/core/team/plan.go b/core/team/plan.go
index 2e5c73bc..18ea9e1e 100644
--- a/core/team/plan.go
+++ b/core/team/plan.go
@@ -50,7 +50,9 @@ func _plan_list(m *ice.Message, begin_time, end_time time.Time) *ice.Message {
m.Push(key, value, fields, val)
m.PushButton(_task_action(m, value[STATUS], mdb.PLUGIN))
})
- m.Cmd(mdb.SELECT, TASK, "", mdb.ZONE, kit.MDB_FOREACH)
+ m.Debug("what %v", 123)
+ m.Cmd(mdb.SELECT, m.Prefix(TASK), "", mdb.ZONE, kit.MDB_FOREACH)
+ m.Debug("what %v", 123)
return m
}
diff --git a/option.go b/option.go
index a81cca5a..bc2c0f9e 100644
--- a/option.go
+++ b/option.go
@@ -127,12 +127,21 @@ func (m *Message) Toast(text string, arg ...interface{}) { // [title [duration [
}
}
+ m.PushNoticeToast("", text, arg)
+}
+func (m *Message) PushNotice(arg ...interface{}) {
if m.Option(MSG_USERPOD) == "" {
- m.Cmd("space", m.Option(MSG_DAEMON), "toast", "", text, arg)
+ m.Cmd("space", m.Option(MSG_DAEMON), arg)
} else {
- m.Option(MSG_TOAST, kit.Simple(text, arg))
+ m.Cmd("web.spide", "dev", kit.MergeURL2(m.Option(MSG_USERWEB), "/share/toast/"), kit.Format(kit.Dict("pod", m.Option(MSG_DAEMON), "cmds", kit.Simple(arg...))))
}
}
+func (m *Message) PushNoticeGrow(arg ...interface{}) {
+ m.PushNotice(kit.List("grow", arg)...)
+}
+func (m *Message) PushNoticeToast(arg ...interface{}) {
+ m.PushNotice(kit.List("toast", arg)...)
+}
func (m *Message) Toast3s(text string, arg ...interface{}) {
m.Toast(text, kit.List(kit.Select("", arg, 0), kit.Select("3s", arg, 1))...)
}
diff --git a/render.go b/render.go
index 289ed47c..ead56aef 100644
--- a/render.go
+++ b/render.go
@@ -18,7 +18,8 @@ func Render(m *Message, cmd string, args ...interface{}) string {
switch arg := kit.Simple(args...); cmd {
case RENDER_ANCHOR: // [name] link
- return kit.Format(`%s`, kit.Select(arg[0], arg, 1), arg[0])
+ p := kit.MergeURL2(m.Option(MSG_USERWEB), kit.Select(arg[0], arg, 1))
+ return kit.Format(`%s`, p, arg[0])
case RENDER_BUTTON: // name...
if m._cmd == nil || m._cmd.Meta == nil {
@@ -146,10 +147,11 @@ func (m *Message) PushAction(list ...interface{}) {
})
}
func (m *Message) PushPodCmd(cmd string, arg ...string) {
- m.Table(func(index int, value map[string]string, head []string) {
- m.Push(POD, m.Option(MSG_USERPOD))
- })
- m.Debug(m.FormatMeta())
+ if m.Length() > 0 && len(m.Appendv(POD)) == 0 {
+ m.Table(func(index int, value map[string]string, head []string) {
+ m.Push(POD, m.Option(MSG_USERPOD))
+ })
+ }
m.Cmd("space").Table(func(index int, value map[string]string, head []string) {
switch value[kit.MDB_TYPE] {