Added menu option to view seed.

This commit is contained in:
Mikunj 2018-12-12 11:26:31 +11:00
parent 0491ceacf1
commit f92cc6cbd4
4 changed files with 8 additions and 14 deletions

View file

@ -1683,6 +1683,10 @@
"message": "Edit display name",
"description": "Button action that the user can click to edit their display name"
},
"showSeed": {
"message": "Show seed",
"description": "Button action that the user can click to view their unique seed"
},
"copiedMnemonic": {
"message": "Copied seed to clipboard",

View file

@ -238,8 +238,8 @@
</div>
<div class='seed'>{{ seed }}</div>
<div class='buttons'>
<button class='copy-seed' tabindex='2'>{{ copyText }}</button>
<button class='ok' tabindex='1'>{{ ok }}</button>
<button class='copy-seed' tabindex='2'>{{ copyText }}</button>
</div>
</div>
</script>

View file

@ -358,6 +358,9 @@
this._mainHeaderItem('editDisplayName', () => {
window.Whisper.events.trigger('onEditProfile');
}),
this._mainHeaderItem('showSeed', () => {
window.Whisper.events.trigger('showSeedDialog');
}),
];
},
async onPasswordUpdated() {

View file

@ -17,7 +17,6 @@
this.render();
},
events: {
keyup: 'onKeyup',
'click .ok': 'ok',
'click .copy-seed': 'copySeed',
},
@ -40,17 +39,5 @@
toast.$el.appendTo(this.$el);
toast.render();
},
onKeyup(event) {
switch (event.key) {
case 'Enter':
case 'Escape':
case 'Esc':
this.ok();
break;
default:
return;
}
event.preventDefault();
},
});
})();