Capitalise constants

pull/540/head
Beaudan Brown 6 years ago
parent 7b0f40535f
commit 64ccd05a2e

@ -8,9 +8,9 @@
window.Whisper = window.Whisper || {}; window.Whisper = window.Whisper || {};
const registerIndex = 0; const REGISTER_INDEX = 0;
const profileIndex = 1; const PROFILE_INDEX = 1;
let currentPageIndex = registerIndex; let currentPageIndex = REGISTER_INDEX;
Whisper.StandaloneRegistrationView = Whisper.View.extend({ Whisper.StandaloneRegistrationView = Whisper.View.extend({
templateName: 'standalone', templateName: 'standalone',
@ -104,7 +104,7 @@
}, },
async showRegisterPage() { async showRegisterPage() {
this.registrationParams = {}; this.registrationParams = {};
this.showPage(registerIndex); this.showPage(REGISTER_INDEX);
}, },
async showProfilePage(mnemonic, language) { async showProfilePage(mnemonic, language) {
this.registrationParams = { this.registrationParams = {
@ -114,11 +114,11 @@
this.$passwordInput.val(''); this.$passwordInput.val('');
this.$passwordConfirmationInput.val(''); this.$passwordConfirmationInput.val('');
this.onValidatePassword(); this.onValidatePassword();
this.showPage(profileIndex); this.showPage(PROFILE_INDEX);
this.$('#display-name').focus(); this.$('#display-name').focus();
}, },
onKeyup(event) { onKeyup(event) {
if (currentPageIndex !== profileIndex) { if (currentPageIndex !== PROFILE_INDEX) {
// Only want enter/escape keys to work on profile page // Only want enter/escape keys to work on profile page
return; return;
} }

Loading…
Cancel
Save