From d38fb0cc4284d5eedb24cf2115928adcfe24b04c Mon Sep 17 00:00:00 2001 From: shy Date: Sun, 28 Jan 2024 14:28:20 +0800 Subject: [PATCH] add some --- lib/user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/user.js b/lib/user.js index 6fd32d06..8a2de535 100644 --- a/lib/user.js +++ b/lib/user.js @@ -276,7 +276,9 @@ Volcanos("user", { 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.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.base.MergeURL(can.user.jumps(value.link), ice.BACK, location.href) + }} }) }]) can.page.style(can, ui._target, {left: (can.page.width()-ui._target.offsetWidth)/2, top: can.page.height() < 640? (can.page.height()-ui._target.offsetHeight)/2: (can.page.height()-ui._target.offsetHeight-html.HEADER_HEIGHT-html.ACTION_HEIGHT)/4+html.HEADER_HEIGHT})