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-08-29 11:09:30 +08:00
parent d8d9ba3b24
commit 7430e2b312
2 changed files with 9 additions and 1 deletions

View File

@ -112,6 +112,7 @@ Volcanos("user", {
meta.title = meta.title||can.user.trans(can, can.core.Keys(can.ConfSpace(), can.ConfIndex()), can.Conf("help"))||can._name.split(nfs.PS).slice(-2).join(nfs.PS) meta.title = meta.title||can.user.trans(can, can.core.Keys(can.ConfSpace(), can.ConfIndex()), can.Conf("help"))||can._name.split(nfs.PS).slice(-2).join(nfs.PS)
meta.hash && can.misc.isDebug(can) && (meta.title += " "+meta.hash.slice(0, 6)), meta.action = meta.action||[""] meta.hash && can.misc.isDebug(can) && (meta.title += " "+meta.hash.slice(0, 6)), meta.action = meta.action||[""]
var width = meta.width||(html.QRCODE_WIDTH+2*html.PLUGIN_PADDING+10); if (width < 0) { width = can.page.width() + width } var width = meta.width||(html.QRCODE_WIDTH+2*html.PLUGIN_PADDING+10); if (width < 0) { width = can.page.width() + width }
if (can.user.isMobile && !can.user.isLandscape()) { width = window.innerWidth }
meta.title = can.base.replaceAll(meta.title||"", "%2F", "/") meta.title = can.base.replaceAll(meta.title||"", "%2F", "/")
var ui = can.page.Append(can, meta.action.list || meta.action.length > 1 || !can._root || !can._root.Action || !can._root.Action._toast ? document.body: can._root.Action._toast, [{view: [[chat.TOAST, can.Conf(ctx.INDEX)||can.ConfIndex(), meta.style, chat.FLOAT]], style: {width: width}, list: [ var ui = can.page.Append(can, meta.action.list || meta.action.length > 1 || !can._root || !can._root.Action || !can._root.Action._toast ? document.body: can._root.Action._toast, [{view: [[chat.TOAST, can.Conf(ctx.INDEX)||can.ConfIndex(), meta.style, chat.FLOAT]], style: {width: width}, list: [
{view: [wiki.TITLE, "", can.user.trans(can, meta.title||"")], title: "点击复制", onclick: function(event) { can.user.copy(event, can, meta.title) }}, {view: [wiki.TITLE, "", can.user.trans(can, meta.title||"")], title: "点击复制", onclick: function(event) { can.user.copy(event, can, meta.title) }},

View File

@ -65,7 +65,14 @@ Volcanos(chat.ONACTION, {_init: function(can) {},
onsize: function(can) { can.ConfHeight(can._target.offsetHeight), can.ConfWidth(can._target.offsetWidth) onsize: function(can) { can.ConfHeight(can._target.offsetHeight), can.ConfWidth(can._target.offsetWidth)
can.onimport.value(can, html.HEIGHT, can.page.height()), can.onimport.value(can, html.WIDTH, can.page.width()) can.onimport.value(can, html.HEIGHT, can.page.height()), can.onimport.value(can, html.WIDTH, can.page.width())
}, },
onlogin: function(can, msg) { can.run(can.request({}, {_method: http.GET}), [], function(msg) { can.onmotion.clear(can), can.onimport._init(can, msg, can._output) }) }, onmain: function(can) {
can.run(can.request({}, {_method: http.GET}), [], function(msg) {
can.page.Appends(can, can._output, [{view: "item title", list: [{text: msg.Result()}]}])
})
},
onlogin: function(can, msg) {
can.run(can.request({}, {_method: http.GET}), [], function(msg) { can.onmotion.clear(can), can.onimport._init(can, msg, can._output) })
},
ontoast: function(can, msg) { can.core.CallFunc(can.onimport.ntip, {can: can, msg: msg}) }, ontoast: function(can, msg) { can.core.CallFunc(can.onimport.ntip, {can: can, msg: msg}) },
onremote: function(can, msg) { can.core.CallFunc(can.onimport.ncmd, {can: can, msg: msg}) }, onremote: function(can, msg) { can.core.CallFunc(can.onimport.ncmd, {can: can, msg: msg}) },
onunload: function(can) { can._wss && can._wss.close() }, onunload: function(can) { can._wss && can._wss.close() },