add "success" message when credential was validated, #100

This commit is contained in:
or-else
2022-08-25 13:45:37 -10:00
parent 14a4725c94
commit 0e53234d02
17 changed files with 97 additions and 8 deletions
+7 -1
View File
@@ -73,6 +73,11 @@ const messages = defineMessages({
id: 'menu_item_video_call',
defaultMessage: 'Video call',
description: 'Start video call'
},
cred_confirmed_successfully: {
id: 'cred_confirmed_successfully',
defaultMessage: 'Confirmed successfully',
description: 'Message explaining that the credential was successfully validated.'
}
});
@@ -1653,7 +1658,8 @@ class TinodeWeb extends React.Component {
if (this.tinode.isAuthenticated()) {
const me = this.tinode.getMeTopic();
me.setMeta({cred: {meth: cred, resp: code}})
.then(() => {
.then(_ => {
this.handleError(this.props.intl.formatMessage(cred_confirmed_successfully), 'info');
HashNavigation.navigateTo('');
})
.catch((err) => {
+1 -1
View File
@@ -42,7 +42,7 @@ class ValidationView extends React.PureComponent {
}
componentDidUpdate(prevProps, prevState) {
// Submit code audomatically if it's received from the parent.
// Submit code automatically if it's received from the parent.
if (this.state.codeReceived && this.state.code != prevState.code) {
this.props.onSubmit(this.props.credMethod, this.state.code.trim());
}