Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions mobileapp/www/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -685,3 +685,13 @@ body {
margin-bottom: 1em;
}

#access-options {
margin 0 auto;
padding-top: 25%;
text-align: center;
}

#access-options > button {
display: block;
margin: 10px auto;
}
8 changes: 7 additions & 1 deletion mobileapp/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,14 @@
</div>
</form>
</div>

<div id="access-options" class="view">
<button id="has-account-btn" class="btn btn-primary">I Have an Account</button>
<br>
<button id="register-btn2" class="btn btn-primary">Create an Account</button>
</div>

<div id="account-login" class="view active">
<div id="account-login" class="view">
<form id="login-form" class="input-group input-group-lg">
<input placeholder="Username"
autocapitalize="off"
Expand Down
13 changes: 8 additions & 5 deletions mobileapp/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ var app = {

this.card = new crypton.Card();
this.bindEvents();
$('#password-login').show();
$('#username-login').show();


function defaultLoginBehavior () {
app.enableLoginButtons();
app.switchView('#account-login');
Expand Down Expand Up @@ -101,7 +99,7 @@ var app = {
});
} else {
// check if keychain is supported
defaultLoginBehavior();
app.switchView('#access-options');
}
// Offline
window.Offline.options = {
Expand Down Expand Up @@ -181,11 +179,16 @@ var app = {
app.about();
});

$("#register-btn").click(function (e) {
$("#register-btn, #register-btn2").click(function (e) {
e.preventDefault();
app.beginRegistration();
});

$("#has-account-btn").click(function(e) {
e.preventDefault();
app.switchView('#account-login');
});

$("#register-generate-cancel-btn").click(function (e) {
e.preventDefault();
app.switchView('#account-login', app.APPNAME);
Expand Down