diff --git a/base/web/dream.go b/base/web/dream.go index fca2880d..47cc7767 100644 --- a/base/web/dream.go +++ b/base/web/dream.go @@ -449,7 +449,7 @@ func init() { }, StatsAction(), DreamAction(), DreamTablesAction(), mdb.ImportantHashAction( mdb.SHORT, mdb.NAME, mdb.FIELD, "time,name,icons,repos,binary,template,restart,access", html.BUTTON, kit.JoinWord(PORTAL, DESKTOP, ADMIN, MESSAGE, WORD, STATUS, VIMER, COMPILE, XTERM, DREAM), - ctx.TOOLS, kit.Simple(ROUTE, SPIDE, STORE, MATRIX), + ctx.TOOLS, kit.Simple(ROUTE, SPIDE, STORE, MATRIX), ONLINE, ice.TRUE, )), Hand: func(m *ice.Message, arg ...string) { if len(arg) == 0 { simple := m.Option("dream.simple") == ice.TRUE @@ -470,6 +470,7 @@ func init() { m.Sort("type,status,name", []string{aaa.LOGIN, WORKER, SERVER, MASTER}, []string{cli.START, cli.STOP, cli.BEGIN}, ice.STR_R) m.StatusTimeCountStats(mdb.TYPE, mdb.STATUS) ctx.DisplayTableCard(m) + ctx.Toolkit(m) } else if arg[0] == ctx.ACTION { gdb.Event(m, DREAM_ACTION, arg) } else { diff --git a/base/web/matrix.go b/base/web/matrix.go index 5c4aa1d9..58013ba0 100644 --- a/base/web/matrix.go +++ b/base/web/matrix.go @@ -133,7 +133,10 @@ func init() { ) StreamPushRefreshConfirm(m, m.Trans("refresh for new space ", "刷新列表查看新空间 ")+kit.Keys(m.Option(DOMAIN), m.Option(mdb.NAME))) }}, - }, ctx.ConfAction(mdb.FIELD, "time,domain,status,type,name,text,icons,repos,binary,module,version", ctx.TOOLS, kit.Simple(SPIDE, STATUS, VERSION))), Hand: func(m *ice.Message, arg ...string) { + }, ctx.ConfAction( + mdb.FIELD, "time,domain,status,type,name,text,icons,repos,binary,module,version", + ctx.TOOLS, kit.Simple(SPIDE, STATUS, VERSION), ONLINE, ice.TRUE, + )), Hand: func(m *ice.Message, arg ...string) { if kit.HasPrefixList(arg, ctx.ACTION) { _matrix_action(m, arg[1], arg[2:]...) return diff --git a/base/web/matrix.js b/base/web/matrix.js index 360084af..c598e444 100644 --- a/base/web/matrix.js +++ b/base/web/matrix.js @@ -13,7 +13,6 @@ Volcanos(chat.ONIMPORT, { })} })}, ] }]), can.onmotion.delay(can, function() { can.Status(mdb.COUNT, can.core.Item(list).length+"x"+can.core.List(domain).length) }) - can.onimport._online(can) can.onmotion.orderShow(can, can.page.SelectOne(can, can._output, "table>tbody"), "tr") }, void: function(can, name, domain, list) { var worker = list[name][""], server = list[""][domain] diff --git a/conf.go b/conf.go index ac9f0a01..495536c8 100644 --- a/conf.go +++ b/conf.go @@ -223,29 +223,30 @@ const ( // MSG MSG_LANGUAGE = "user.lang" MSG_AVATAR = "user.avatar" - MSG_BG = "sess.bg" - MSG_FG = "sess.fg" - MSG_COST = "sess.cost" - MSG_MODE = "sess.mode" - MSG_THEME = "sess.theme" - MSG_TITLE = "sess.title" - MSG_RIVER = "sess.river" - MSG_STORM = "sess.storm" - MSG_COUNT = "sess.count" - MSG_DAEMON = "sess.daemon" - MSG_REFERER = "sess.referer" - MSG_FILES = "file.system" - MSG_CHECKER = "aaa.checker" - YAC_MESSAGE = "yac.message" - YAC_STACK = "yac.stack" - SSH_ALIAS = "ssh.alias" - SSH_TARGET = "ssh.target" - LOG_DISABLE = "log.disable" - LOG_TRACEID = "log.id" - MSG_NODETYPE = "node.type" + MSG_BG = "sess.bg" + MSG_FG = "sess.fg" + MSG_COST = "sess.cost" + MSG_MODE = "sess.mode" + MSG_THEME = "sess.theme" + MSG_TITLE = "sess.title" + MSG_RIVER = "sess.river" + MSG_STORM = "sess.storm" + MSG_COUNT = "sess.count" + MSG_DAEMON = "sess.daemon" + MSG_ONLINE = "sess.online" + MSG_REFERER = "sess.referer" + MSG_CHECKER = "aaa.checker" + YAC_MESSAGE = "yac.message" + YAC_STACK = "yac.stack" + SSH_ALIAS = "ssh.alias" + SSH_TARGET = "ssh.target" + LOG_DISABLE = "log.disable" + LOG_TRACEID = "log.id" - FROM_DAEMON = "from.daemon" + MSG_NODETYPE = "node.type" + MSG_FILES = "file.system" FROM_SPACE = "from.space" + FROM_DAEMON = "from.daemon" TABLE_CHECKBOX = "table.checkbox" TOAST_DURATION = "toast.duration" ) diff --git a/core/chat/message.go b/core/chat/message.go index b8feb8bc..7f32e099 100644 --- a/core/chat/message.go +++ b/core/chat/message.go @@ -19,7 +19,7 @@ const MESSAGE = "message" func init() { Index.MergeCommands(ice.Commands{ - MESSAGE: {Name: "message", Help: "聊天", Icon: "Messages.png", Actions: ice.MergeActions(ice.Actions{ + MESSAGE: {Name: "message refresh", Help: "聊天", Icon: "Messages.png", Actions: ice.MergeActions(ice.Actions{ ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { MessageCreate(m, aaa.APPLY, html.ICONS_MAIL) MessageCreate(m, web.DREAM, html.ICONS_DREAM) @@ -78,6 +78,7 @@ func init() { }, web.DreamAction(), web.DreamTablesAction(), gdb.EventsAction(aaa.USER_CREATE, aaa.USER_REMOVE), mdb.ZoneAction( mdb.SHORT, mdb.ZONE, mdb.FIELD, "time,hash,type,zone,icons,title,count,target", mdb.FIELDS, "time,id,type,name,text,space,index,args,style,display,username,usernick,avatar,direct", + web.ONLINE, ice.TRUE, )), Hand: func(m *ice.Message, arg ...string) { if len(arg) == 0 { mdb.ZoneSelect(m.Display("").Spawn(), arg...).Table(func(value ice.Maps) { @@ -95,6 +96,7 @@ func init() { m.PushButton(list...) }) m.Sort(mdb.TIME, ice.STR_R) + ctx.Toolkit(m) } else { if msg := mdb.ZoneSelects(m.Spawn(), arg[0]); !kit.IsIn(m.Option(ice.MSG_USERROLE), msg.Append(mdb.TYPE), aaa.TECH, aaa.ROOT) { return diff --git a/core/chat/message.js b/core/chat/message.js index 43d4853c..90031f65 100644 --- a/core/chat/message.js +++ b/core/chat/message.js @@ -2,7 +2,6 @@ Volcanos(chat.ONIMPORT, { _init: function(can, msg) { // if (can.isCmdMode()) { can.onappend.style(can, html.OUTPUT) } can.ui = can.onappend.layout(can), can.onimport._project(can, msg) - can.onimport._online(can) }, _project: function(can, msg) { var select, current = can.db.hash[0]||can.sup.db.current||ice.DEV can.page.insertBefore(can, [{view: wiki.TITLE, list: [ diff --git a/core/code/vimer.go b/core/code/vimer.go index 47679a12..35fc3b9e 100644 --- a/core/code/vimer.go +++ b/core/code/vimer.go @@ -216,7 +216,7 @@ func init() { chat.FAVOR_ACTION: {Hand: func(m *ice.Message, arg ...string) { kit.If(m.Option(mdb.TYPE) == nfs.FILE, func() { ctx.ProcessField(m, m.ShortKey(), nfs.SplitPath(m, m.Option(mdb.TEXT))) }) }}, - }, ctx.ConfAction(ctx.TOOLS, "xterm,compile,runtime"), chat.FavorAction(), web.DreamTablesAction("编程")), Hand: func(m *ice.Message, arg ...string) { + }, chat.FavorAction(), web.DreamTablesAction("编程"), ctx.ConfAction(ctx.TOOLS, "xterm,compile,runtime", web.ONLINE, ice.TRUE)), Hand: func(m *ice.Message, arg ...string) { if m.Cmdy(INNER, arg); arg[0] != ctx.ACTION { if web.IsLocalHost(m) { m.Action(nfs.SAVE, COMPILE, mdb.SHOW, ice.APP) diff --git a/core/team/plan.go b/core/team/plan.go index c094eb18..9da28de3 100644 --- a/core/team/plan.go +++ b/core/team/plan.go @@ -82,7 +82,7 @@ func init() { m.Cmdy(arg) } }}, - }, web.DreamTablesAction(), gdb.EventsAction(aaa.USER_CREATE, aaa.USER_REMOVE), ctx.ConfAction(mdb.TOOLS, "todo,epic"), TASK), Hand: func(m *ice.Message, arg ...string) { + }, web.DreamTablesAction(), gdb.EventsAction(aaa.USER_CREATE, aaa.USER_REMOVE), ctx.ConfAction(mdb.TOOLS, "todo,epic", "online", ice.TRUE), TASK), Hand: func(m *ice.Message, arg ...string) { begin_time, end_time := _plan_scope(m, kit.Slice(arg, 0, 2)...) _plan_list(m, begin_time.Format(ice.MOD_TIME), end_time.Format(ice.MOD_TIME)) web.PushPodCmd(m, "", arg...)