Initial commit (code only without large binaries)
This commit is contained in:
40
EdgeUser/web/views/@default/account/reset.css
Normal file
40
EdgeUser/web/views/@default/account/reset.css
Normal file
@@ -0,0 +1,40 @@
|
||||
@media screen and (min-width: 512px) {
|
||||
.form-box {
|
||||
position: fixed;
|
||||
top: 2.5em;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
form {
|
||||
position: fixed;
|
||||
width: 30em;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -15em;
|
||||
margin-top: -16em;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 512px) {
|
||||
.form-box {
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
}
|
||||
}
|
||||
table td.title {
|
||||
width: 10em;
|
||||
}
|
||||
table td {
|
||||
vertical-align: top;
|
||||
}
|
||||
p.comment,
|
||||
div.comment {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
padding-top: 0.4em;
|
||||
font-size: 1em;
|
||||
}
|
||||
span.red,
|
||||
pre.red {
|
||||
color: #db2828;
|
||||
}
|
||||
/*# sourceMappingURL=reset.css.map */
|
||||
1
EdgeUser/web/views/@default/account/reset.css.map
Normal file
1
EdgeUser/web/views/@default/account/reset.css.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["reset.less"],"names":[],"mappings":"AAAA,mBAAqC;EACpC;IACC,eAAA;IACA,UAAA;IACA,SAAA;IACA,OAAA;IACA,QAAA;;EAGD;IACC,eAAA;IACA,WAAA;IACA,QAAA;IACA,SAAA;IACA,kBAAA;IACA,iBAAA;;;AAIF,mBAAqC;EACpC;IACC,iBAAA;IACA,kBAAA;;;AAKF,KAAM,GAAE;EACP,WAAA;;AAGD,KAAM;EACL,mBAAA;;AAGD,CAAC;AAAU,GAAG;EACb,yBAAA;EACA,kBAAA;EACA,cAAA;;AAGD,IAAI;AAAM,GAAG;EACZ,cAAA","file":"reset.css"}
|
||||
69
EdgeUser/web/views/@default/account/reset.html
Normal file
69
EdgeUser/web/views/@default/account/reset.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
{$if eq .faviconFileId 0}
|
||||
<link rel="shortcut icon" href="/images/favicon.png"/>
|
||||
{$else}
|
||||
<link rel="shortcut icon" href="/ui/image/{$ .faviconFileId}"/>
|
||||
{$end}
|
||||
<title>找回密码 - {$ htmlEncode .systemName}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
|
||||
{$TEA.VUE}
|
||||
{$TEA.SEMANTIC}
|
||||
<link rel="stylesheet" type="text/css" href="/_/@default/@layout_override.css" media="all"/>
|
||||
<script type="text/javascript" src="/js/md5.min.js"></script>
|
||||
<script type="text/javascript" src="/js/utils.min.js"></script>
|
||||
<script type="text/javascript" src="/js/sweetalert2/dist/sweetalert2.all.min.js"></script>
|
||||
<script type="text/javascript" src="/js/components.js?v=1.0.0"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
{$template "/menu"}
|
||||
|
||||
<div class="form-box">
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success" data-tea-before="before">
|
||||
<csrf-token></csrf-token>
|
||||
<input type="hidden" name="action" v-model="action"/>
|
||||
<table class="ui table definition selectable">
|
||||
<tr v-show="!isSent">
|
||||
<td class="title">用户名或邮箱 *</td>
|
||||
<td>
|
||||
<input type="text" name="usernameOrEmail" placeholder="用户名、邮箱" ref="focus" v-model="nameOrEmail"/>
|
||||
<p class="comment">请输入你的用户名或者已经绑定的邮箱。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tbody v-show="isSent">
|
||||
<tr>
|
||||
<td class="title">用户名或邮箱</td>
|
||||
<td>{{nameOrEmail}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>验证码 *</td>
|
||||
<td>
|
||||
<input type="text" name="code" style="width: 6em" maxlength="6" ref="verifyCodeInput"/>
|
||||
<p class="comment"><span class="red">6位数字验证码已经发送到邮箱{{email}},请查收。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>新登录密码 *</td>
|
||||
<td>
|
||||
<input type="password" name="newPass" maxlength="100"/>
|
||||
<p class="comment">长度不小于6位<span v-if="complexPassword">,且必须包含大写字母和小写字母</span>。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>确认新登录密码 *</td>
|
||||
<td>
|
||||
<input type="password" name="newPass2" maxlength="100"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<submit-btn v-show="!isSent">下一步</submit-btn>
|
||||
<submit-btn v-show="isSent">保存新密码</submit-btn>
|
||||
<a href="/login">回登录页</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
32
EdgeUser/web/views/@default/account/reset.js
Normal file
32
EdgeUser/web/views/@default/account/reset.js
Normal file
@@ -0,0 +1,32 @@
|
||||
Tea.context(function () {
|
||||
this.$delay(function () {
|
||||
let input = this.$refs.focus
|
||||
if (input != null) {
|
||||
input.focus()
|
||||
}
|
||||
})
|
||||
|
||||
this.nameOrEmail = ""
|
||||
this.isSent = false
|
||||
this.email = ""
|
||||
this.action = "send"
|
||||
|
||||
this.before = function () {
|
||||
|
||||
}
|
||||
|
||||
this.success = function (resp) {
|
||||
if (this.action == "send") {
|
||||
this.isSent = true
|
||||
this.action = "update"
|
||||
this.email = resp.data.email
|
||||
this.$delay(function () {
|
||||
this.$refs.verifyCodeInput.focus()
|
||||
})
|
||||
} else if (this.action == "update") {
|
||||
teaweb.success("你已成功设置了新密码,现在去登录", function () {
|
||||
window.location = "/"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
44
EdgeUser/web/views/@default/account/reset.less
Normal file
44
EdgeUser/web/views/@default/account/reset.less
Normal file
@@ -0,0 +1,44 @@
|
||||
@media screen and (min-width: 512px) {
|
||||
.form-box {
|
||||
position: fixed;
|
||||
top: 2.5em;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
form {
|
||||
position: fixed;
|
||||
width: 30em;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -15em;
|
||||
margin-top: -16em;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 512px) {
|
||||
.form-box {
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
table td.title {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
table td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
p.comment, div.comment {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
padding-top: 0.4em;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
span.red, pre.red {
|
||||
color: #db2828;
|
||||
}
|
||||
Reference in New Issue
Block a user