From ed2ca7260418d5a7e5683e0fedea03b62b7621bd Mon Sep 17 00:00:00 2001 From: shy Date: Tue, 17 Jun 2025 14:54:55 +0800 Subject: [PATCH] add some --- frame.js | 2 +- plugin/table.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/frame.js b/frame.js index acd782c9..6c7a5fe9 100644 --- a/frame.js +++ b/frame.js @@ -376,7 +376,7 @@ Volcanos(chat.ONAPPEND, { sub.onappend._status(sub, sub.onexport&&sub.onexport.list||msg.Option(ice.MSG_STATUS), null, msg), can.user.isMobile || sub.onappend.tools(sub, msg) // if (msg.Option("sess.online") == ice.TRUE) { can.ondaemon._online(can) } if (!msg.IsDetail() && msg.Length() > 9 && !sub.ui.project && !can.user.isMobile) { - can.onmotion.delay(can, function() { can.onappend._filter(can) }, 300) + can.base.endWith(sub.ConfIndex(), ".portal") || can.onmotion.delay(can, function() { can.onappend._filter(can) }, 300) } } diff --git a/plugin/table.js b/plugin/table.js index 76236c7f..3bc5b953 100644 --- a/plugin/table.js +++ b/plugin/table.js @@ -368,6 +368,7 @@ Volcanos(chat.ONIMPORT, { value.type = html.STORY, value.style = html.OUTPUT, value.height = can._stacks_root.ConfHeight()-ACTION_HEIGHT can.onappend.plugin(portal, value, function(sub) { can.onimport.myField(can, sub), can.onmotion.slideIn(sub) var STREET_NAME = plugin.sub.Conf("_street_name"), PLACE_NAME = plugin.sub.Conf("_place_name") + var USER_PLACE_ROLE = plugin.sub.Conf("_user_place_role") var run = sub.run; sub.run = function(event, cmds, cb) { if (cmds[0] == ctx.ACTION && cmds[1] == mdb.REMOVE) { if (sub._msg.IsDetail()) { @@ -411,6 +412,17 @@ Volcanos(chat.ONIMPORT, { msg.IsDetail() === false && can.onappend.filter(can, _action, sub._output) if (can.base.endWith(sub.ConfIndex(), ".portal")) { return } msg.Option(ice.MSG_ACTION) && can.onappend._action(sub, msg.Option(ice.MSG_ACTION), _action, null, true) + if (msg.IsDetail() && msg.Append("user_uid") != msg.Option("user.uid")) { can.page.Append(can, _action, [{view: [[html.ITEM, html.SPACE]]}]) + // var value = msg.TableDetail() + var value = {user_uid: msg.Option("user.uid"), user_name: msg.Option(ice.MSG_USERNICK), user_avatar: can.misc.Resource(can, msg.Option("user.avatar"))} + // value[USER_PLACE_ROLE] = "creator" + // msg.Option("user_role") + can.page.Append(can, _action, [{view: [[html.ITEM, "user_info"]], list: [ + {view: html.NAME, list: [{text: value.user_name}, can.onimport.timeView(can, value)]}, can.onimport.textView(can, value, USER_PLACE_ROLE), {img: value.user_avatar}, + ], onclick: function(event) { + _sub.run(_sub.request(event, {uid: value.user_uid}), [ctx.ACTION, "userInfo"]) + }}]) + } } sub._select = function() { can.onimport.myOption(sub), can.user.trans(can, {goback: "返回"}) can.page.SelectChild(can, _output, "*", function(target) { can.onmotion.toggle(can, target, target == sub._target) }) @@ -425,6 +437,7 @@ Volcanos(chat.ONIMPORT, { sub._msg && sub._msg.IsDetail() === false && can.onappend.filter(can, _action, sub._output) can.page.style(can, _action, html.DISPLAY, html.FLEX) can.user.isMobile && sub.onimport.size(sub, window.innerHeight-ACTION_HEIGHT, window.innerWidth, false) + // var msg = sub._msg } can._stacks_current.push(sub), sub._select() }, _output)