Review fixes

pull/266/head
Mikunj 6 years ago
parent c7130a3bbb
commit b2ecb87462

@ -1825,6 +1825,11 @@
"Button action that the user can click to view their unique seed"
},
"seedViewTitle": {
"message": "Please save the seed below in a safe location. They can be used to restore your account if you lose access or migrate to a new device.",
"description": "The title shown when the user views their seeds"
},
"copiedMnemonic": {
"message": "Copied seed to clipboard",
"description":

@ -238,7 +238,7 @@
<!-- Password -->
<div class="passwordView">
<div class='title'>
Please type in your password
{{ passwordViewTitle }}
</div>
<div class='fields'>
<input class='form-control' type='password' id='password' placeholder='Password' autocomplete='off' spellcheck='false'>
@ -253,9 +253,7 @@
<!-- Seed -->
<div class="seedView" style="display: none;">
<div class='title'>
Please save the seed below in a safe location.
</br>
They can be used to restore your account if you lose access or migrate to a new device.
{{ seedViewTitle }}
</div>
<div class='seed'></div>
<div class='buttons'>

@ -19,6 +19,8 @@
this.render();
this.showSeedView(false);
this.initPasswordHash();
this.$('#password').bind('keyup', (event) => this.onKeyup(event));
},
events: {
'click .ok': 'close',
@ -27,6 +29,8 @@
},
render_attributes() {
return {
passwordViewTitle: i18n('passwordViewTitle'),
seedViewTitle: i18n('seedViewTitle'),
ok: this.okText,
copyText: this.copyText,
confirm: this.confirmText,
@ -48,6 +52,7 @@
} else {
this.$('.seed').html('');
passwordView.show();
this.$('#password').focus()
seedView.hide();
}
},
@ -76,5 +81,18 @@
toast.$el.appendTo(this.$el);
toast.render();
},
onKeyup(event) {
switch (event.key) {
case 'Enter':
this.confirmPassword();
break;
case 'Escape':
case 'Esc':
this.close();
break;
default:
break;
}
},
});
})();

Loading…
Cancel
Save