mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
3ff489512c
commit
6c3dfa04bc
1
const.js
1
const.js
@ -122,6 +122,7 @@ var aaa = {
|
|||||||
PROVINCE: "province", COUNTRY: "country", CITY: "city",
|
PROVINCE: "province", COUNTRY: "country", CITY: "city",
|
||||||
LONGITUDE: "longitude", LATITUDE: "latitude",
|
LONGITUDE: "longitude", LATITUDE: "latitude",
|
||||||
EMAIL: "email", SECRET: "secret",
|
EMAIL: "email", SECRET: "secret",
|
||||||
|
OFFER: "offer",
|
||||||
MOBILE: "mobile",
|
MOBILE: "mobile",
|
||||||
|
|
||||||
USERNICK: "usernick", USERNAME: "username", PASSWORD: "password", USERROLE: "userrole", USERZONE: "userzone",
|
USERNICK: "usernick", USERNAME: "username", PASSWORD: "password", USERROLE: "userrole", USERZONE: "userzone",
|
||||||
|
@ -272,16 +272,16 @@ Volcanos("user", {
|
|||||||
}, ui.output)
|
}, ui.output)
|
||||||
} } else if (value.type == cli.QRCODE) { _list.push(value.name), list[value.name] = function(target) { can.page.Modify(can, target, arg[2]) } } })
|
} } else if (value.type == cli.QRCODE) { _list.push(value.name), list[value.name] = function(target) { can.page.Modify(can, target, arg[2]) } } })
|
||||||
var ui = can.onappend.tabview(can, list, _list, can.page.Append(can, document.body, [{view: "input login float flex"}])._target)
|
var ui = can.onappend.tabview(can, list, _list, can.page.Append(can, document.body, [{view: "input login float flex"}])._target)
|
||||||
|
if (window.parent != window && window.innerHeight < 480) { can.onmotion.hidden(can, ui.output) }
|
||||||
var _cmd = "space login "+arg[0]; ui.display = can.page.Append(can, ui._target, [html.DISPLAY])._target, can.onappend.style(can, html.FLEX, ui.display)
|
var _cmd = "space login "+arg[0]; ui.display = can.page.Append(can, ui._target, [html.DISPLAY])._target, can.onappend.style(can, html.FLEX, ui.display)
|
||||||
can.page.Appends(can, ui.display, [{text: ["或命令行授权: ", html.LABEL]}, {text: ["$ "+_cmd, "", html.ITEM], title: "点击复制,并后台执行此命令,即可登录", style: {cursor: "copy"}, onclick: function() { can.user.copy(event, can, _cmd) }}])
|
can.page.Appends(can, ui.display, [{text: ["或命令行授权: ", html.LABEL]}, {text: ["$ "+_cmd, "", html.ITEM], title: "点击复制,并后台执行此命令,即可登录", style: {cursor: "copy"}, onclick: function() { can.user.copy(event, can, _cmd) }}])
|
||||||
can.page.Append(can, ui.display, [{text: ["或第三方授权: ", html.LABEL]}, {view: [["sso", html.FLEX]], list: _msg.Table(function(value) {
|
can.page.Append(can, ui.display, [{text: ["或第三方授权: ", html.LABEL]}, {view: [["sso", html.FLEX]], list: _msg.Table(function(value) {
|
||||||
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.base.Min((window.innerHeight-ui._target.offsetHeight-html.HEADER_HEIGHT-html.ACTION_HEIGHT)/2, 0)+html.HEADER_HEIGHT})
|
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})
|
||||||
cb && cb(); return true
|
cb && cb(); return true
|
||||||
} else if (cmd == ice.MSG_SESSID) {
|
} else if (cmd == ice.MSG_SESSID) { if (!can.misc.CookieSessid(can, arg[0])) { can.user.info.sessid = arg[0] } check(), cb && cb(); return true }
|
||||||
if (!can.misc.CookieSessid(can, arg[0])) { can.user.info.sessid = arg[0] } check(), cb && cb(); return true
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
logout: function(can) { can.user.toastConfirm(can, aaa.LOGOUT, "", function() { can.runAction({}, aaa.LOGOUT, [], function(msg) {
|
logout: function(can) { can.user.toastConfirm(can, aaa.LOGOUT, "", function() { can.runAction({}, aaa.LOGOUT, [], function(msg) {
|
||||||
|
@ -67,7 +67,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
|||||||
Volcanos(chat.ONACTION, {_init: function(can) {},
|
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) },
|
||||||
onmain: function(can) {
|
onmain: function(can) {
|
||||||
if (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, "")
|
||||||
}
|
}
|
||||||
function lang(msg, cb) { can.user.info.language = msg.SearchOrOption(aaa.LANGUAGE)
|
function lang(msg, cb) { can.user.info.language = msg.SearchOrOption(aaa.LANGUAGE)
|
||||||
@ -93,7 +93,8 @@ Volcanos(chat.ONACTION, {_init: function(can) {},
|
|||||||
msg.Option(mdb.PLUGIN) && can.onappend.plugin(can, {index: msg.Option(mdb.PLUGIN)}, function(sub) { can.onmotion.hidden(can, sub._target) }, document.body)
|
msg.Option(mdb.PLUGIN) && can.onappend.plugin(can, {index: msg.Option(mdb.PLUGIN)}, function(sub) { can.onmotion.hidden(can, sub._target) }, document.body)
|
||||||
msg.Option(nfs.SCRIPT) && can.require(can.base.Obj(msg.Option(nfs.SCRIPT)), function(can) { can.onaction.source(can, msg) })
|
msg.Option(nfs.SCRIPT) && can.require(can.base.Obj(msg.Option(nfs.SCRIPT)), function(can) { can.onaction.source(can, msg) })
|
||||||
if (!can.Conf(aaa.USERNICK, (msg.Option(aaa.USERNICK)||msg.Option(ice.MSG_USERNICK)||msg.Option(ice.MSG_USERNAME)).slice(0, 8))) {
|
if (!can.Conf(aaa.USERNICK, (msg.Option(aaa.USERNICK)||msg.Option(ice.MSG_USERNICK)||msg.Option(ice.MSG_USERNAME)).slice(0, 8))) {
|
||||||
var tool = can._root.Action._conf.tool; if (tool && tool[0]._role == ice.OK && tool[0].index != web.CHAT_GRANT || can.misc.Search(can, web.SHARE)) { return show(msg) }
|
var tool = can._root.Action._conf.tool; if (tool && tool[0]._role == ice.OK && tool[0].index != web.CHAT_GRANT ||
|
||||||
|
tool && can.base.isIn(tool[0].index, aaa.OFFER) || can.misc.Search(can, web.SHARE)) { return show(msg) }
|
||||||
return can.user.login(can, function() { can.onengine.signal(can, chat.ONMAIN, msg) }, msg)
|
return can.user.login(can, function() { can.onengine.signal(can, chat.ONMAIN, msg) }, msg)
|
||||||
} show(msg)
|
} show(msg)
|
||||||
})
|
})
|
||||||
|
@ -84,7 +84,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) {
|
|||||||
}}]) },
|
}}]) },
|
||||||
icon: function(can, msg, target, cb) { return msg.Table(function(value) {
|
icon: function(can, msg, target, cb) { return msg.Table(function(value) {
|
||||||
var icon = can.misc.Resource(can, value.icon||can.page.drawText(can, value.name, 80), value.space||can.ConfSpace())
|
var icon = can.misc.Resource(can, value.icon||can.page.drawText(can, value.name, 80), value.space||can.ConfSpace())
|
||||||
return can.page.Append(can, target, [{view: html.ITEM, list: [{view: html.ICON, list: [{img: icon}]}, {view: [mdb.NAME, "", value.name]}], _init: function(target) {
|
return can.page.Append(can, target, [{view: [[html.ITEM, value.status]], list: [{view: html.ICON, list: [{img: icon}]}, {view: [mdb.NAME, "", value.name]}], _init: function(target) {
|
||||||
cb && cb(target, value)
|
cb && cb(target, value)
|
||||||
}, onclick: function(event) { can.sup.onexport.record(can.sup, value.name, mdb.NAME, value) }}])._target
|
}, onclick: function(event) { can.sup.onexport.record(can.sup, value.name, mdb.NAME, value) }}])._target
|
||||||
}) },
|
}) },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user