diff --git a/lib/user.js b/lib/user.js index 4a92e65c..6218c6bb 100644 --- a/lib/user.js +++ b/lib/user.js @@ -87,7 +87,7 @@ Volcanos("user", { toast: function(can, content, title, duration, progress, caller) { content = {"success": "✅ success", "failure": "❌ failure", "process": "🕑 process"}[content]||content var meta = can.base.isObject(content)? content: {content: content, duration: duration, progress: progress, caller: caller} - meta.title = meta.title||can.core.Keys(can.Conf(web.SPACE), can.Conf(ctx.INDEX))||can._name.split(nfs.PS).slice(-2).join(nfs.PS) + meta.title = meta.title||can.core.Keys(can.ConfSpace(), can.ConfIndex())||can._name.split(nfs.PS).slice(-2).join(nfs.PS) var width = meta.width||380; if (width < 0) { width = window.innerWidth + width } meta.action = meta.action||[""] var ui = can.page.Append(can, document.body, [{view: [[chat.TOAST, chat.FLOAT]], style: {left: (window.innerWidth-width)/2, width: width, top: can.page.height()/2}, list: [ {text: [meta.title||"", html.DIV, html.TITLE], title: "点击复制", onclick: function(event) { can.user.copy(event, can, meta.title) }}, diff --git a/plugin/state.js b/plugin/state.js index 1e013dca..6b04bdbe 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -43,7 +43,7 @@ Volcanos(chat.ONIMPORT, { (sub._rich_list = sub._rich_list||[]).push(msg); if (sub._rich_list.length > 1) { return } } var height = can.onexport.outputHeight(can) - can.onappend.plugin(can, {title: msg.Option(ice.MSG_TITLE)||"table.js", index: "can._filter", height: height, style: "rich"}, function(sub) { + can.onappend.plugin(can, {title: can.core.Keys(can.ConfSpace(), msg.Option(ice.MSG_TITLE)||"table.js"), index: "can._filter", height: height, style: "rich"}, function(sub) { sub.onexport.output = function() { can.sub._rich = sub.sub, _rich(), can.onmotion.scrollIntoView(can, sub._target) } }); return }, @@ -66,7 +66,7 @@ Volcanos(chat.ONIMPORT, { (can.sub._grow_list = can.sub._grow_list||[]).push(msg); if (can.sub._grow_list.length > 1) { return } } var height = can.onexport.outputHeight(can) - can.onappend.plugin(can, {title: msg.Option(ice.MSG_TITLE)||msg.Option(ctx.DISPLAY).split(nfs.PS).pop(), index: "can._filter", display: msg.Option(ctx.DISPLAY), height: height}, function(sub) { + can.onappend.plugin(can, {title: can.core.Keys(can.ConfSpace(), msg.Option(ice.MSG_TITLE)||msg.Option(ctx.DISPLAY).split(nfs.PS).pop()), index: "can._filter", display: msg.Option(ctx.DISPLAY), height: height}, function(sub) { sub.onexport.output = function() { can.onmotion.scrollIntoView(can, sub._target), can.sub._grow = sub.sub, _grow() } }); return }