Register link in the login page

This commit is contained in:
yflory 2018-12-14 16:50:25 +01:00
parent 2031d535d7
commit d76c21fcf5
4 changed files with 13 additions and 7 deletions

View File

@ -30,7 +30,8 @@ define([
UI.createCheckbox('import-recent', Msg.register_importRecent),
]),
h('div.extra', [
h('button.login.first.btn', Msg.login_login)
h('button.login.first.btn', Msg.login_login),
h('button#register.first.btn', Msg.login_register)
])
])
]),

View File

@ -61,6 +61,16 @@
transform: scale(1.05);
}
}
#register {
border-color: @cryptpad_color_blue;
background: #fff;
color: @cryptpad_color_blue;
padding: 10px;
border-radius: 0;
&:hover {
transform: scale(1.05);
}
}
}
}
.cp-container {

View File

@ -71,9 +71,6 @@ define([
if ($uname.val()) {
sessionStorage.login_user = $uname.val();
}
if ($passwd.val()) {
sessionStorage.login_pass = $passwd.val();
}
}
window.location.href = '/register/';
});

View File

@ -38,11 +38,9 @@ define([
var $confirm = $('#password-confirm');
if (sessionStorage.login_user) {
delete sessionStorage.login_user;
$uname.val(sessionStorage.login_user);
}
if (sessionStorage.login_pass) {
$passwd.val(sessionStorage.login_pass);
}
[ $uname, $passwd, $confirm]
.some(function ($el) { if (!$el.val()) { $el.focus(); return true; } });