diff --git a/frame.js b/frame.js index 3c196b8a..63809ca4 100644 --- a/frame.js +++ b/frame.js @@ -27,6 +27,7 @@ Volcanos(chat.ONENGINE, {_init: function(can, meta, list, cb, target) { if (sub._daemon) { msg.Option(ice.MSG_DAEMON, can.core.Keys(can.ondaemon._list[0], sub._daemon)) } } if (!can.misc.CookieSessid(can) && can.user.info.sessid) { msg.Option(ice.MSG_SESSID, can.user.info.sessid) } var names = msg.Option(chat._NAMES)||panel._names||((can.Conf("iceberg")||Volcanos.meta.iceberg)+"/chat/"+panel._name+nfs.PS) + can.user.info.sessid && msg.Option(ice.MSG_SESSID, can.user.info.sessid) names = can.base.MergeURL(names, ice.MSG_INDEX, sub.ConfIndex()), can.page.exportValue(sub, msg) can.onengine.signal(panel, chat.ONREMOTE, can.request({}, {_follow: panel._follow, _msg: msg, _cmds: cmds, names: names})) can.misc.Run(event, can, {names: names}, cmds, function(msg) { toast && toast.close && toast.close(), toast = true, _toast && can.user.toastSuccess(msg._can) diff --git a/lib/user.js b/lib/user.js index e28f01c6..f7c65c4d 100644 --- a/lib/user.js +++ b/lib/user.js @@ -279,7 +279,7 @@ Volcanos("user", { return value.type == "oauth" && {view: [[html.ITEM, html.FLEX]], title: "点击跳转,授权登录", list: [{img: can.misc.Resource(can, value.icons)}, {text: value.name}], onclick: function() { can.user.jumps(value.link) }} }) }]) can.page.style(can, ui._target, {left: (window.innerWidth-ui._target.offsetWidth)/2, top: - can.base.Min((window.innerHeight-ui._target.offsetHeight-html.HEADER_HEIGHT-html.ACTION_HEIGHT)/4, 0)+html.HEADER_HEIGHT}) + can.base.Min((window.innerHeight-ui._target.offsetHeight-html.HEADER_HEIGHT-html.ACTION_HEIGHT)/4, 0)+(window.innerHeight > 640? html.HEADER_HEIGHT: 0)}) cb && cb(); return true } else if (cmd == ice.MSG_SESSID) { if (!can.misc.CookieSessid(can, arg[0])) { can.user.info.sessid = arg[0] } check(), cb && cb(); return true } }) diff --git a/panel/header.js b/panel/header.js index 3350b9ce..0d03cebc 100644 --- a/panel/header.js +++ b/panel/header.js @@ -69,7 +69,7 @@ Volcanos(chat.ONACTION, {_init: function(can) {}, onmain: function(can) { if (window.parent == window && can.misc.Search(can, ice.MSG_SESSID) && can.misc.CookieSessid(can, can.misc.Search(can, ice.MSG_SESSID)) && !can.user.isMailMaster) { return can.misc.Search(can, ice.MSG_SESSID, "") - } + } can.user.info.sessid = can.misc.Search(can, ice.MSG_SESSID) function lang(msg, cb) { can.user.info.language = msg.SearchOrOption(aaa.LANGUAGE) can.user.info.language? can.require([can.misc.Resource(can, nfs.SRC_TEMPLATE+web.CHAT_HEADER+"/language/"+can.user.info.language+".js")], cb, function(can, name, sub) { can.base.Copy(can.user._trans, sub._trans) }): cb && cb() can.onmotion.delay(can, function() { can.onimport._language(can) }) diff --git a/plugin/input/key.js b/plugin/input/key.js index e5aac7db..3090b3f8 100644 --- a/plugin/input/key.js +++ b/plugin/input/key.js @@ -32,8 +32,9 @@ Volcanos(chat.ONFIGURE, {key: { }) }, onblur: function(event, can, sub, cb) { sub && can.onmotion.delay(can, sub.close, 300) }, - onkeydown: function(event, can, meta, cb, target, sub, last) { if (event.key == code.TAB) { return } - if (event.key == code.ENTER) { return meta._enter && (!can.page.tagis(event.target, html.TEXTAREA) || event.ctrlKey) && meta._enter(event, target.value)? sub.close(): last(event) } + onkeydown: function(event, can, meta, cb, target, sub, last) { + if (event.key == code.TAB) { return } + if (event.key == code.ENTER) { return meta._enter && (!can.page.tagis(event.target, html.TEXTAREA) || event.ctrlKey) && meta._enter(event, target.value)? sub && sub.close(): last(event) } if (!sub) { return } can.onmotion.toggle(can, sub._target, true) sub.hidden() || can.onkeymap.selectCtrlN(event, can, sub._output, "tr:not(.hidden)>td:first-child", function(td) { return meta.select && (sub.close(), meta.select(target.value = td.innerText)), cb(sub, td.innerText, target.value), td }) || can.onmotion.delayOnce(can, function() { can.onkeymap.selectInputs(event, sub, function() { sub._load(event, sub, cb, target, meta.name) }, target) }, target.value.length < 3? 500: 150) diff --git a/plugin/state.js b/plugin/state.js index 03b49ee0..1f53ce72 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -15,7 +15,7 @@ Volcanos(chat.ONIMPORT, { msg.Table(function(item) { can.onappend._plugin(can, item, {_space: can.ConfSpace(), index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { if (can.base.isIn(sub.ConfIndex(), web.WIKI_PORTAL, web.CHAT_IFRAME, web.CHAT_MACOS_DESKTOP, web.WIKI_WORD, web.CODE_VIMER, - )) { height = can.base.Max(can.base.Min(can.onexport.outputHeight(can), 480), can.ConfHeight()) } + )) { height = can.base.Max(can.base.Min(can.onexport.outputHeight(can), 640), can.ConfHeight()) } can.onmotion.delay(can, function() { can.onmotion.scrollIntoView(can, sub._target) }, 300) sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX) can.run(event, (msg[ice.MSG_PREFIX]? msg[ice.MSG_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true)