Merge pull request #69 from vbaranov/softening-of-alert

(Fix) Beautify alerts
This commit is contained in:
Victor Baranov 2018-02-23 16:23:27 +03:00 committed by GitHub
commit 88f54c5ad1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View File

@ -14,7 +14,7 @@ import Loading from './Loading';
function generateElement(msg){
let errorNode = document.createElement("div");
errorNode.innerHTML = `<div>
errorNode.innerHTML = `<div style="line-height: 1.6;">
${msg}
</div>`;
return errorNode;
@ -103,9 +103,11 @@ class App extends Component {
console.log(isValid);
if(Number(isValid) !== 1){
this.setState({loading:false});
const invalidKeyMsg = `The key is not valid initial Key!<br/>
Please make sure you have loaded correct initial key in metamask.<br/>
Your current selected key is ${initialKey}`
const invalidKeyMsg = `The key is invalid initial Key<br/>
or you're connect to incorrect chain!<br/>
Please make sure you have loaded correct initial key in Metamask.<br/><br/>
<b>Your current selected key is</b> <i>${initialKey}</i><br/>
<b>Current Network ID</b> is <i>${this.state.web3Config.netId}</i>`
swal({
icon: 'error',
title: 'Error',

View File

@ -1,10 +1,10 @@
let errorMsgNoMetamaskAccount = `You haven't chosen any account in MetaMask.
Please, choose your initial key in MetaMask and reload the page.
Please choose your initial key in MetaMask and reload the page.
Check POA Network <a href='https://github.com/poanetwork/wiki' target='blank'>wiki</a> for more info.`;
function generateElement(msg){
let errorNode = document.createElement("div");
errorNode.innerHTML = `<div>
errorNode.innerHTML = `<div style="line-height: 1.6;">
${msg}
</div>`;
return errorNode;
@ -33,11 +33,11 @@ let getWeb3 = () => {
console.log('This is Core')
break
default:
netIdName = 'ERROR'
netIdName = 'Unknown'
errorMsg = `You aren't connected to POA Network.
Please, switch on POA plugin and refresh the page.
Please switch on Metamask and refresh the page.
Check POA Network <a href='https://github.com/poanetwork/wiki' target='blank'>wiki</a> for more info.
Current Network Id: ${netId}`
<b>Current Network ID</b> is <i>${netId}</i>`
console.log('This is an unknown network.', netId)
}