From 357f865e9a3abe532c4ed4af6c8386549a32b042 Mon Sep 17 00:00:00 2001 From: shy Date: Thu, 12 Oct 2023 08:54:12 +0800 Subject: [PATCH] add m.Status --- frame.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frame.js b/frame.js index 40de58f3..90a52c58 100644 --- a/frame.js +++ b/frame.js @@ -253,8 +253,10 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { }) }, _status: function(can, list, status) { status = status||can._status, can.onmotion.clear(can, status) + var keys = {} can.core.List(can.base.Obj(list, can.core.Value(can, [chat.ONEXPORT, mdb.LIST])), function(item) { item = can.base.isString(item)? {name: item}: item if (can.base.beginWith(item.value, nfs.PS, ice.HTTP)) { item.value = can.page.Format(html.A, item.value, item.value.split("?")[0]) } + if (keys[item.name]) { return can.Status(item.name, item.value) } keys[item.name] = item can.page.Append(can, status, [{view: html.ITEM, list: [ {text: [can.page.Color(item.name), html.LABEL]}, {text: [": ", html.LABEL]}, {text: [(item.value == undefined? "": item.value.trim())+"", html.SPAN, item.name]}, ], onclick: function(event) { can.user.copy(event, can, item.value) }}])