1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-26 01:04:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-01-20 12:10:44 +08:00
parent f3ee78a0c7
commit 8fbff9a445
3 changed files with 18 additions and 13 deletions

View File

@ -145,7 +145,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
}) }) }) })
}), can.base.isFunc(cb) && cb(sub) }), can.base.isFunc(cb) && cb(sub)
if (sub.isOutputStyle()) { return } if (can.user.isMobile && !can.user.isLandscape()) { return } if (sub.isOutputStyle()) { return } if (can.user.isMobile && !can.user.isLandscape()) { return }
sub.isCmdMode() && !can.base.isIn(meta.index, web.CODE_VIMER, web.CODE_INNER, web.CHAT_MACOS_DESKTOP) && can.page.insertBefore(can, can.user.header(can), sub._output, sub._fields||sub._target) sub.isCmdMode() && !can.base.isIn(meta.index, web.CODE_VIMER, web.CODE_INNER, web.CHAT_MACOS_DESKTOP) && can.page.insertBefore(can, can.user.header(sub), sub._output, sub._fields||sub._target)
}); return sub }); return sub
}, },
_option: function(can, meta, option, skip) { var index = -1, args = can.base.Obj(meta.args||meta.arg, []), opts = can.base.Obj(meta.opts, {}) _option: function(can, meta, option, skip) { var index = -1, args = can.base.Obj(meta.args||meta.arg, []), opts = can.base.Obj(meta.opts, {})
@ -809,10 +809,11 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) {
tableFilter: function(can, target, value) { can.page.Select(can, target, html.TR, function(tr, index) { tableFilter: function(can, target, value) { can.page.Select(can, target, html.TR, function(tr, index) {
index > 0 && can.page.ClassList.set(can, tr, html.HIDDEN, can.page.Select(can, tr, html.TD, function(td) { if (td.innerText.toLowerCase().indexOf(value.toLowerCase()) > -1) { return td } }) == 0) index > 0 && can.page.ClassList.set(can, tr, html.HIDDEN, can.page.Select(can, tr, html.TD, function(td) { if (td.innerText.toLowerCase().indexOf(value.toLowerCase()) > -1) { return td } }) == 0)
}) }, }) },
delayResize: function(can, target, key) { can.onmotion.delay(can, function() { can.page.Select(can, target, key, function(_target) { delayResize: function(can, target, key) {
var width = _target.offsetWidth+2*html.PLUGIN_PADDING can.page.Select(can, target, key, function(_target) { _target.onload = function() { var width = _target.offsetWidth+2*html.PLUGIN_PADDING
can.page.style(can, target, html.WIDTH, width, html.LEFT, (window.innerWidth-width)/2, html.TOP, (window.innerHeight-_target.offsetHeight)/2) can.page.style(can, target, html.WIDTH, width, html.LEFT, (window.innerWidth-width)/2, html.TOP, (window.innerHeight-_target.offsetHeight)/4)
}) }) }, } })
},
delayLong: function(can, cb, interval, key) { can.onmotion.delay(can, cb, interval||300, key) }, delayLong: function(can, cb, interval, key) { can.onmotion.delay(can, cb, interval||300, key) },
delayOnce: function(can, cb, interval, list) { delayOnce: function(can, cb, interval, list) {
if (!list) { var call = can.misc.fileLine(2), _call = "_delay_"+call.file+call.line; list = can[_call] = can[_call]||{} } if (!list) { var call = can.misc.fileLine(2), _call = "_delay_"+call.file+call.line; list = can[_call] = can[_call]||{} }

View File

@ -662,9 +662,9 @@ fieldset.Search>div.output>div.profile { border-left:none; width:unset; }
fieldset.Action.tabs table.content { width:100%; } fieldset.Action.tabs table.content { width:100%; }
fieldset.Action>div.output>fieldset.plugin:not(.float):not(.full):not(.cmd) { padding:var(--plugin-padding); margin:var(--plugin-margin); box-shadow:var(--box-shadow); } fieldset.Action>div.output>fieldset.plugin:not(.float):not(.full):not(.cmd) { padding:var(--plugin-padding); margin:var(--plugin-margin); box-shadow:var(--box-shadow); }
fieldset.Action>div.output>fieldset.plugin:not(.float):not(.full):not(.cmd)>legend { float:none; } fieldset.Action>div.output>fieldset.plugin:not(.float):not(.full):not(.cmd)>legend { float:none; }
fieldset.cmd>div.item.time { line-height:22px; padding:var(--input-padding) var(--button-padding); float:right; } fieldset.cmd>div.item.state { line-height:22px; padding:var(--input-padding) var(--button-padding); float:right; }
fieldset.cmd>div.item.usernick { line-height:22px; padding:var(--input-padding) var(--button-padding); float:right; } /* fieldset.cmd>div.item.qrcode { padding:0; height:var(--action-height); } */
fieldset.cmd>div.item.avatar { padding:0; height:var(--action-height); float:right; } fieldset.cmd>div.item.avatar { padding:0; height:var(--action-height); }
fieldset.cmd>div.item.avatar>img { height:var(--action-height); } fieldset.cmd>div.item.avatar>img { height:var(--action-height); }
fieldset.cmd>div.action>div.tabs.select { border-bottom:var(--notice-bg-color) solid 2px; } fieldset.cmd>div.action>div.tabs.select { border-bottom:var(--notice-bg-color) solid 2px; }
fieldset.cmd>div.status>legend.select { border-top:var(--notice-bg-color) solid 2px; } fieldset.cmd>div.status>legend.select { border-top:var(--notice-bg-color) solid 2px; }

View File

@ -118,7 +118,7 @@ Volcanos("user", {
share: function(can, msg, cmds) { can.page.exportValue(can, msg) share: function(can, msg, cmds) { can.page.exportValue(can, msg)
can.run(msg, cmds||[ctx.ACTION, chat.SHARE], function(msg) { can.user.copy(msg._event, can, msg.Append(mdb.NAME)) can.run(msg, cmds||[ctx.ACTION, chat.SHARE], function(msg) { can.user.copy(msg._event, can, msg.Append(mdb.NAME))
var ui = can.user.toast(can, {title: msg.Append(mdb.NAME), duration: -1, content: msg.Append(mdb.TEXT), action: [cli.CLOSE, cli.OPEN], resize: html.IMG}) var ui = can.user.toast(can, {title: msg.Append(mdb.NAME), duration: -1, content: msg.Append(mdb.TEXT), action: [cli.CLOSE, cli.OPEN], resize: html.IMG})
can.page.style(can, ui._target, html.TOP, (can.page.height() - 360)/2) can.page.style(can, ui._target, html.TOP, (can.page.height() - 360)/4)
}) })
}, },
copy: function(event, can, text) { if (!text) { return } copy: function(event, can, text) { if (!text) { return }
@ -289,13 +289,17 @@ Volcanos("user", {
}) }) }, }) }) },
header: function(can) { if (!can._root) { return } var header = can._root.Header header: function(can) { if (!can._root) { return } var header = can._root.Header
var meta = { var meta = {
time: !can.user.isMobile && {view: [[html.ITEM, mdb.TIME, html.FLEX]], _init: function(target) { time: !can.user.isMobile && {view: [[html.ITEM, "state", mdb.TIME, html.FLEX]], _init: function(target) {
can.onappend.figure(can, {action: "date", _hold: true}, target, function(sub, value) {}) can.onappend.figure(can, {action: "date", _hold: true}, target, function(sub, value) {})
can.core.Timer({interval: 100}, function() { can.page.Modify(can, target, can.user.time(can, null, "%H:%M:%S %w")) }) can.core.Timer({interval: 100}, function() { can.page.Modify(can, target, can.user.time(can, null, "%H:%M:%S %w")) })
}}, }},
avatar: {view: [[html.ITEM, aaa.AVATAR]], list: [{img: can.user.info.avatar}], onclick: function(event) { header && header.onaction.avatar(event, header) }}, avatar: {view: [[html.ITEM, "state", aaa.AVATAR]], list: [{img: can.user.info.avatar}], onclick: function(event) { header && header.onaction.avatar(event, header) }},
usernick: {view: [[html.ITEM, aaa.USERNICK, html.FLEX], "", can.user.info.usernick], onclick: function(event) { header && header.onaction.usernick(event, header) }}, usernick: {view: [[html.ITEM, "state", aaa.USERNICK, html.FLEX], "", can.user.info.usernick], onclick: function(event) { header && header.onaction.usernick(event, header) }},
}; return can.core.List(can.base.getValid(can.core.List(arguments).slice(1), [html.SPACE, mdb.TIME, aaa.AVATAR, aaa.USERNICK]), function(item) { return meta[item] }) qrcode: {view: [[html.ITEM, "state", cli.QRCODE]], list: [{icon: icon.qrcode}], onclick: function(event) {
var _can = can._fields? can.sup: can; _can.onaction["生成链接"](event, _can)
// can._root.Header.onaction.qrcode(event, can._root.Header)
}},
}; return can.core.List(can.base.getValid(can.core.List(arguments).slice(1), [html.SPACE, mdb.TIME, aaa.AVATAR, aaa.USERNICK, cli.QRCODE]), function(item) { return meta[item] })
}, },
email: function(can) { email: function(can) {
can.page.Select(can, document.body, html.IFRAME, function(target) { can.page.Select(can, document.body, html.IFRAME, function(target) {