From ca4e7aeb5399bad2aa63d9e4284c941118dab330 Mon Sep 17 00:00:00 2001 From: shy Date: Sat, 9 Mar 2024 16:27:28 +0800 Subject: [PATCH] add some --- base/web/matrix.js | 16 +++++++++------- core/team/plan.go | 4 +++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/base/web/matrix.js b/base/web/matrix.js index 6c4b1893..e8ddaa99 100644 --- a/base/web/matrix.js +++ b/base/web/matrix.js @@ -30,7 +30,7 @@ Volcanos(chat.ONIMPORT, { {img: can.misc.Resource(can, item.icons, can.core.Keys(item.domain, item.name)), onclick: cb(web.DESKTOP)}, {view: wiki.TITLE, list: [ {text: item.name||item.domain||location.host, onclick: cb(web.OPEN)}, item.status != cli.STOP && can.onappend.label(can, item, {version: icon.version, time: icon.compile, access: "bi bi-file-lock"}), - {text: [item.text, "", "status"]}, + {text: [item.text, "", mdb.STATUS]}, can.onappend.buttons(can, item), ]}, ], _init: function(target) { @@ -47,13 +47,15 @@ Volcanos(chat.ONACTION, { can.page.ClassList.add(can, can._output, "process") can.core.Next(can.db.server, function(server, next, index) { can.core.Next(can.core.Item(can.db.list, function(key, value) { return value }), function(list, next, i) { - var item = list[server]; if (!item) { return next() } - if (!item.name || item.status != cli.START) { return next() } + var item = list[server]; if (!item) { return next() } if (!item.name || item.status != cli.START) { return next() } can.page.ClassList.add(can, item._target, "process") - can.Update(can.request({}, item, {_handle: ice.TRUE}), [ctx.ACTION, code.UPGRADE], function(msg) { - next() - }) + can.Update(can.request({}, item, {_handle: ice.TRUE}), [ctx.ACTION, code.UPGRADE], function(msg) { next() }) }, next) - }, function() { can.Update() }) + }, function() { + can.core.Next(can.db.server, function(server, next, index) { + var item = can.db.list[""][server]; can.page.ClassList.add(can, item._target, "process") + can.Update(can.request({}, item, {_handle: ice.TRUE}), [ctx.ACTION, code.UPGRADE], function(msg) { next() }) + }, function() { can.onmotion.delay(can, function() {can.Update() }, 3000) }) + }) }, }) diff --git a/core/team/plan.go b/core/team/plan.go index 59529c04..ecb7f7b2 100644 --- a/core/team/plan.go +++ b/core/team/plan.go @@ -70,7 +70,9 @@ func init() { web.StreamPushRefreshConfirm(m, m.Trans("refresh for new message ", "刷新列表,查看最新消息 ")) }}, web.DREAM_CREATE: {Hand: func(m *ice.Message, arg ...string) { - PlanInsertPlan(m, web.DREAM, "", m.Option(mdb.NAME), web.CHAT_IFRAME, web.S(m.Option(mdb.NAME))) + if ice.Info.Important { + PlanInsertPlan(m, web.DREAM, "", m.Option(mdb.NAME), web.CHAT_IFRAME, web.S(m.Option(mdb.NAME))) + } }}, web.DREAM_REMOVE: {Hand: func(m *ice.Message, arg ...string) { PlanInsertPlan(m, web.DREAM, "", "", web.CHAT_IFRAME, web.S(m.Option(mdb.NAME)))