1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-01-16 15:28:41 +08:00
parent 6c3dfa04bc
commit 9179b141a3
5 changed files with 7 additions and 5 deletions

View File

@ -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 (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) } } 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) 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) 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.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) can.misc.Run(event, can, {names: names}, cmds, function(msg) { toast && toast.close && toast.close(), toast = true, _toast && can.user.toastSuccess(msg._can)

View File

@ -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) }} 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.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 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 } } else if (cmd == ice.MSG_SESSID) { if (!can.misc.CookieSessid(can, arg[0])) { can.user.info.sessid = arg[0] } check(), cb && cb(); return true }
}) })

View File

@ -69,7 +69,7 @@ Volcanos(chat.ONACTION, {_init: function(can) {},
onmain: 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) { 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, "") 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) 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.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) }) can.onmotion.delay(can, function() { can.onimport._language(can) })

View File

@ -32,8 +32,9 @@ Volcanos(chat.ONFIGURE, {key: {
}) })
}, },
onblur: function(event, can, sub, cb) { sub && can.onmotion.delay(can, sub.close, 300) }, 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 } onkeydown: function(event, can, meta, cb, target, sub, last) {
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) } 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) 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 }) 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) || 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)

View File

@ -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) { 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(), if (can.base.isIn(sub.ConfIndex(),
web.WIKI_PORTAL, web.CHAT_IFRAME, web.CHAT_MACOS_DESKTOP, web.WIKI_WORD, web.CODE_VIMER, 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) 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) 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) can.run(event, (msg[ice.MSG_PREFIX]? msg[ice.MSG_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true)