Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
37da95c6
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
12 个月 前同步成功
通知
76
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
37da95c6
编写于
10月 25, 2021
作者:
MaxKey单点登录官方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
login sytle
上级
e44766b1
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
124 addition
and
250 deletion
+124
-250
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/login.ftl
...y-web-maxkey/src/main/resources/templates/views/login.ftl
+2
-1
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/loginmobile.ftl
...maxkey/src/main/resources/templates/views/loginmobile.ftl
+12
-12
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/loginnormal.ftl
...maxkey/src/main/resources/templates/views/loginnormal.ftl
+9
-11
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/logintfa.ftl
...eb-maxkey/src/main/resources/templates/views/logintfa.ftl
+12
-26
maxkey-webs/maxkey-web-resources/src/main/resources/static/css/base.css
...xkey-web-resources/src/main/resources/static/css/base.css
+43
-93
maxkey-webs/maxkey-web-resources/src/main/resources/static/javascript/login.js
...b-resources/src/main/resources/static/javascript/login.js
+46
-107
未找到文件。
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/login.ftl
浏览文件 @
37da95c6
...
...
@@ -36,7 +36,7 @@
</td>
<td>
<table
id=
"
tableform"
>
<table
class=
"login
tableform"
>
<tr>
<td>
<ul
id=
"switch_tab"
class=
"switch_tab"
style=
"width: 360px;"
>
...
...
@@ -57,6 +57,7 @@
<
@
locale
code=
"login.text.login.mobile"
/>
</a>
</li>
<!---->
<li
id=
"qrcodelogin"
class=
"switch_tab_class col-md-4"
>
<a
href=
"javascript:void(0);"
>
<
@
locale
code=
"login.text.login.qrcode"
/>
...
...
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/loginmobile.ftl
浏览文件 @
37da95c6
...
...
@@ -21,24 +21,24 @@
<div class="wrapper">
<i class="fa fa-lock fa-2"></i>
<input required="" class="form-control" type='password' id='mobile_j_password' name='password' value="" tabindex="2" style="float: left;"/>
<input class="form-control" id="mobile_j_otp_captcha_button" type="button" tabindex="5" class="button" value="<@locale code="login.text.login.mobile.obtain"/>"/>
<button class="btn btn-outline-secondary" id="mobile_j_otp_button" tabindex="5" type="button" >
<@locale code="login.text.login.mobile.obtain"/>
</button>
</div>
</td>
</tr>
<#if true==isRemeberMe>
<tr>
<td colspan="2">
<table style="width:100%">
<tr>
<td style="width:50%">
<span class="form_checkbox_label">
<input type='checkbox' id="mobile_remeberMe" name="remeberMe" class="checkbox" tabindex="4" value="remeberMe" />
<@locale code="login.text.remeberme"/>
</span>
</td>
<td style="width:50%"><a href="<@base />/forgotpassword/forward"><@locale code="login.text.forgotpassword"/></a></td>
</tr>
</table>
<div class="col-sm-6 float-left" style="line-height: 30px;">
<span class="form_checkbox_label">
<input type='checkbox' id="mobile_remeberMe" name="remeberMe" class="checkbox" tabindex="4" value="remeberMe" />
<@locale code="login.text.remeberme"/>
</span>
</div>
<div class="col-sm-6 float-left" style="line-height: 30px;">
<a href="<@base />/forgotpassword/forward"><@locale code="login.text.forgotpassword"/></a>
</div>
</td>
</tr>
</#if>
...
...
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/loginnormal.ftl
浏览文件 @
37da95c6
...
...
@@ -39,17 +39,15 @@
<#if true==isRemeberMe>
<tr>
<td colspan="2">
<table style="width:100%">
<tr>
<td style="width:50%">
<span class="form_checkbox_label">
<input type='checkbox' id="remeberMe" name="remeberMe" class="checkbox" tabindex="4" value="remeberMe" />
<@locale code="login.text.remeberme"/>
</span>
</td>
<td style="width:50%"><a href="<@base />/forgotpassword/forward"><@locale code="login.text.forgotpassword"/></a></td>
</tr>
</table>
<div class="col-sm-6 float-left" style="line-height: 30px;">
<span class="form_checkbox_label">
<input type='checkbox' id="remeberMe" name="remeberMe" class="checkbox" tabindex="4" value="remeberMe" />
<@locale code="login.text.remeberme"/>
</span>
</div>
<div class="col-sm-6 float-left" style="line-height: 30px;">
<a href="<@base />/forgotpassword/forward"><@locale code="login.text.forgotpassword"/></a>
</div>
</td>
</tr>
</#if>
...
...
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/logintfa.ftl
浏览文件 @
37da95c6
...
...
@@ -31,39 +31,25 @@
<div class="wrapper">
<i class="fa fa-lock fa-2"></i>
<input required="" class="form-control" type='text' id="tfa_j_otp_captcha" name="otpCaptcha" tabindex="3" value="" style="float: left;"/>
<input class="form-control" id="tfa_j_otp_captcha_button" type="button" tabindex="5" class="button" value="<@locale code="login.text.login.twofactor.obtain"/>"/>
<button class="btn btn-outline-secondary" id="tfa_j_otp_button" tabindex="5" type="button" >
<@locale code="login.text.login.twofactor.obtain"/>
</button>
</div>
</td>
</tr>
<#if "TOPT"==otpType >
<tr>
<td><@locale code="login.text.currenttime"/>:</td>
<td>
<input class="form-control" readonly type='text' id="currentTime" name="currentTime" tabindex="3" value="" />
</td>
</tr>
</#if>
<tr>
<td></td>
<td>
<div id="currentTime"></div>
</td>
</tr>
</#if>
<#if true==isRemeberMe>
<tr>
<td colspan="2">
<table style="width:100%">
<tr>
<td style="width:50%">
<span class="form_checkbox_label">
<input type='checkbox' id="tfa_remeberMe" name="remeberMe" class="checkbox" tabindex="4" value="remeberMe" />
<@locale code="login.text.remeberme"/>
</span>
</td>
<td style="width:50%"><a href="<@base />/forgotpassword/forward"><@locale code="login.text.forgotpassword"/></a></td>
</tr>
</table>
<div class="col-sm-6 float-left" style="line-height: 30px;">
<span class="form_checkbox_label">
<input type='checkbox' id="tfa_remeberMe" name="remeberMe" class="checkbox" tabindex="4" value="remeberMe" />
<@locale code="login.text.remeberme"/>
</span>
</div>
<div class="col-sm-6 float-left" style="line-height: 30px;">
<a href="<@base />/forgotpassword/forward"><@locale code="login.text.forgotpassword"/></a>
</div>
</td>
</tr>
</#if>
...
...
maxkey-webs/maxkey-web-resources/src/main/resources/static/css/base.css
浏览文件 @
37da95c6
...
...
@@ -166,6 +166,39 @@ body{
text-decoration
:
none
;
}
/*switch_tab*/
.switch_tab
{
list-style
:
none
;
border
:
0
;
cellspacing
:
0
;
padding-left
:
0
;
}
.switch_tab_class
{
float
:
left
;
height
:
36px
;
text-align
:
center
;
display
:
inline-block
;
}
.switch_tab_class
a
{
text-decoration
:
none
;
display
:
inline-block
;
height
:
14px
;
color
:
#333
;
font-size
:
14px
;
font-weight
:
bold
;
padding
:
8px
0
;
vertical-align
:
central
;
}
.switch_tab_current
{
background-color
:
#f3f6f7
;
;
border-right
:
1px
solid
#e3e3e3
;
border-bottom
:
1px
solid
#e3e3e3
;
}
.form_radio_label
,
.form_checkbox_label
{
display
:
inline-block
;
text-align
:
left
;
...
...
@@ -208,94 +241,9 @@ body{
display
:
inline-block
;
margin-top
:
-0.2em
;
}
.select-menu-modal
{
position
:
absolute
;
display
:
none
;
z-index
:
1989
;
width
:
300px
;
margin-top
:
4px
;
margin-bottom
:
20px
;
overflow
:
hidden
;
font-size
:
12px
;
color
:
#666
;
background-color
:
#fff
;
background-clip
:
padding-box
;
border
:
1px
solid
#ccc
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.15
);
border-radius
:
5px
;
box-shadow
:
0
3px
12px
rgba
(
0
,
0
,
0
,
0.25
);
}
.select-menu-item
{
cursor
:
pointer
;
line-height
:
33px
;
border-bottom
:
1px
solid
#eee
;
display
:
table
;
table-layout
:
fixed
;
width
:
100%
;
overflow
:
hidden
;
color
:
inherit
;
text-align
:
left
;
}
.select-menu-item
a
{
text-decoration
:
none
;
}
.select-menu-item
a
div
{
width
:
140px
;
line-height
:
33px
;
}
.select-menu-item-selected
{
background-color
:
#4183c4
;
color
:
#fff
;
}
.select-menu-item-selected
a
{
color
:
#fff
;
}
/*switch_tab*/
.switch_tab
{
list-style
:
none
;
border
:
0
;
cellspacing
:
0
;
padding-left
:
0
;
}
.switch_tab_class
{
float
:
left
;
height
:
36px
;
text-align
:
center
;
display
:
inline-block
;
}
.switch_tab_class
a
{
text-decoration
:
none
;
display
:
inline-block
;
height
:
14px
;
color
:
#333
;
font-size
:
14px
;
font-weight
:
bold
;
padding
:
8px
0
;
vertical-align
:
central
;
}
.switch_tab_current
{
background-color
:
#f3f6f7
;
;
border-right
:
1px
solid
#e3e3e3
;
border-bottom
:
1px
solid
#e3e3e3
;
}
/* logins */
#
tableform
{
.login
tableform
{
border
:
1px
solid
#e9eeed
;
cellspacing
:
0
;
}
...
...
@@ -323,18 +271,13 @@ body{
}
#tfa_j_otp_captcha
,
#mobile_j_password
{
width
:
110px
;
font-size
:
14px
;
font-weight
:
bold
;
}
#tfa_j_otp_captcha_button
,
#mobile_j_otp_captcha_button
{
width
:
120px
;
height
:
34px
;
font-size
:
14px
;
font-weight
:
bold
;
}
#j_captchaimg
{
width
:
70px
;
height
:
33px
;
...
...
@@ -404,3 +347,10 @@ body{
color
:
gray
;
}
#tfa_j_otp_button
,
#mobile_j_otp_button
{
width
:
130px
;
height
:
34px
;
font-size
:
14px
;
font-weight
:
bold
;
text-indent
:
1px
;
}
maxkey-webs/maxkey-web-resources/src/main/resources/static/javascript/login.js
浏览文件 @
37da95c6
var
captchaCountTimer
;
var
captchaCount
=
60
;
function
getCaptchaCount
(){
$
(
"
#mobile_j_otp_captcha_button
"
).
val
(
"
重新获取(
"
+
captchaCount
+
"
)秒
"
);
captchaCount
--
;
if
(
captchaCount
==
0
){
$
(
"
#mobile_j_otp_captcha_button
"
).
val
(
"
发送验证码
"
);
captchaCount
=
60
;
clearInterval
(
captchaCountTimer
);
}
}
var
fullYear
=
currentDate
.
getFullYear
();
var
month
=
currentDate
.
getMonth
()
+
1
;
var
date
=
currentDate
.
getDate
();
var
hours
=
currentDate
.
getHours
();
var
minutes
=
currentDate
.
getMinutes
();
var
seconds
=
currentDate
.
getSeconds
();
var
strTime
=
""
;
function
formatTime
(){
strTime
=
fullYear
+
"
-
"
;
strTime
+=
(
month
<
10
?
"
0
"
+
month
:
month
)
+
"
-
"
;
strTime
+=
(
date
<
10
?
"
0
"
+
date
:
date
)
+
"
"
;
strTime
+=
(
hours
<
10
?
"
0
"
+
hours
:
hours
)
+
"
:
"
;
strTime
+=
(
minutes
<
10
?
"
0
"
+
minutes
:
minutes
)
+
"
:
"
;
strTime
+=
(
seconds
<
10
?
"
0
"
+
seconds
:
seconds
);
}
var
currentSwitchTab
=
"
normalLogin
"
;
function
doLoginSubmit
(){
$
.
cookie
(
"
mxk_login_username
"
,
$
(
"
#
"
+
currentSwitchTab
+
"
Form input[name=username]
"
).
val
(),
{
expires
:
7
});
$
(
"
#
"
+
currentSwitchTab
+
"
SubmitButton
"
).
click
();
$
.
cookie
(
"
mxk_login_switch_tab
"
,
currentSwitchTab
,
{
expires
:
7
});
};
function
currentTime
(){
seconds
++
;
if
(
seconds
>
59
){
minutes
++
;
seconds
=
0
;
}
if
(
minutes
>
59
){
hours
++
;
minutes
=
0
;
}
if
(
hours
>
23
){
date
++
;
hours
=
0
;
}
formatTime
();
//for timebase token
getTimeBaseCount
();
$
(
"
#currentTime
"
).
val
(
strTime
);
}
var
timeBaseCount
;
function
getTimeBaseCount
(){
if
(
seconds
<
30
){
timeBaseCount
=
30
-
seconds
;
}
else
{
timeBaseCount
=
30
-
(
seconds
-
30
);
}
$
(
"
#tfa_j_otp_captcha_button
"
).
val
(
"
剩余时间(
"
+
timeBaseCount
+
"
)秒
"
);
};
var
currentSwitchTab
=
"
normalLogin
"
;
function
doLoginSubmit
(){
$
.
cookie
(
"
mxk_login_username
"
,
$
(
"
#
"
+
currentSwitchTab
+
"
Form input[name=username]
"
).
val
(),
{
expires
:
7
});
$
(
"
#
"
+
currentSwitchTab
+
"
SubmitButton
"
).
click
();
$
.
cookie
(
"
mxk_login_switch_tab
"
,
currentSwitchTab
,
{
expires
:
7
});
document
.
onkeydown
=
function
(
event
){
var
e
=
event
||
window
.
event
||
arguments
.
callee
.
caller
.
arguments
[
0
];
if
(
e
&&
e
.
keyCode
==
13
){
doLoginSubmit
();
};
};
function
switchTab
(
id
){
if
(
$
(
"
#
"
+
id
+
"
Form input[name=username]
"
).
val
()
==
""
){
$
(
"
#
"
+
id
+
"
Form input[name=username]
"
).
focus
();
}
else
{
$
(
"
#
"
+
id
+
"
Form input[name=password]
"
).
focus
();
}
currentSwitchTab
=
id
;
var
countDownTimer
;
var
captchaCount
=
60
;
function
doCountDownTimer
(){
$
(
"
#mobile_j_otp_button
"
).
val
(
"
重新获取(
"
+
captchaCount
+
"
)秒
"
);
captchaCount
--
;
if
(
captchaCount
<=
0
){
$
(
"
#mobile_j_otp_button
"
).
val
(
"
发送验证码
"
);
captchaCount
=
60
;
clearInterval
(
countDownTimer
);
}
document
.
onkeydown
=
function
(
event
){
var
e
=
event
||
window
.
event
||
arguments
.
callee
.
caller
.
arguments
[
0
];
if
(
e
&&
e
.
keyCode
==
13
){
}
$
(
function
(){
//setInterval("currentTime()", 1000);
$
(
"
.doLoginSubmit
"
).
on
(
"
click
"
,
function
(){
doLoginSubmit
();
};
};
$
(
function
(){
//setInterval("currentTime()", 1000);
});
var
cookieLoginUsername
=
$
.
cookie
(
"
mxk_login_username
"
);
if
(
cookieLoginUsername
!=
undefined
&&
cookieLoginUsername
!=
""
){
var
switch_tab
=
$
.
cookie
(
"
mxk_login_switch_tab
"
)
==
undefined
?
"
normalLogin
"
:
$
.
cookie
(
"
mxk_login_switch_tab
"
);
$
(
"
#
"
+
switch_tab
).
click
();
$
(
"
#
"
+
switch_tab
+
"
Form input[name=username]
"
).
val
(
cookieLoginUsername
==
undefined
?
""
:
cookieLoginUsername
);
$
(
"
#div_
"
+
switch_tab
+
"
input[name=password]
"
).
focus
();
}
else
{
$
(
"
#div_normalLogin input[name=username]
"
).
focus
();
}
$
(
"
.doLoginSubmit
"
).
on
(
"
click
"
,
function
(){
doLoginSubmit
();
//send sms to mobile
$
(
"
#mobile_j_otp_button
"
).
on
(
"
click
"
,
function
(){
var
loginName
=
$
(
"
#mobile_j_username
"
).
val
();
if
(
captchaCount
<
60
||
loginName
==
""
){
return
;
}
$
.
get
(
webContextPath
+
"
/login/sendsms/
"
+
loginName
,
function
(
data
,
status
){
//alert("Data: " + data + "\nStatus: " + status);
});
var
cookieLoginUsername
=
$
.
cookie
(
"
mxk_login_username
"
);
if
(
cookieLoginUsername
!=
undefined
&&
cookieLoginUsername
!=
""
){
var
switch_tab
=
$
.
cookie
(
"
mxk_login_switch_tab
"
)
==
undefined
?
"
normalLogin
"
:
$
.
cookie
(
"
mxk_login_switch_tab
"
);
$
(
"
#
"
+
switch_tab
).
click
();
$
(
"
#
"
+
switch_tab
+
"
Form input[name=username]
"
).
val
(
cookieLoginUsername
==
undefined
?
""
:
cookieLoginUsername
);
$
(
"
#div_
"
+
switch_tab
+
"
input[name=password]
"
).
focus
();
}
else
{
$
(
"
#div_normalLogin input[name=username]
"
).
focus
();
}
$
(
"
#mobile_j_otp_captcha_button
"
).
on
(
"
click
"
,
function
(){
if
(
captchaCount
<
60
){
return
;
}
var
loginName
=
$
(
"
#mobile_j_username
"
).
val
();
if
(
loginName
==
""
){
return
;
}
$
.
get
(
webContextPath
+
"
/login/sendsms/
"
+
loginName
,
function
(
data
,
status
){
//alert("Data: " + data + "\nStatus: " + status);
});
captchaCountTimer
=
setInterval
(
"
getCaptchaCount()
"
,
1000
);
});
});
\ No newline at end of file
//倒计时60秒
countDownTimer
=
setInterval
(
"
doCountDownTimer()
"
,
1000
);
});
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录