UI fixes backporting (#3234)
* Fix /parity-utils/{web3,parity}.js webpack errors (#3221)
* Don't override library builds
* Don't override libraries on build
* Enhance working blockNumber display
* Don't push empty tags to input (#3222)
Former-commit-id: d3e51d21c8fc1b7cf9105e28c4719bf3ecba14e0
This commit is contained in:
committed by
Gav Wood
parent
b88823b51f
commit
2e9cde38e4
@@ -6,8 +6,31 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="icon" href="/parity-logo-black-no-text.png" type="image/png">
|
||||
<title>dev::Parity.js</title>
|
||||
<script src="/parity-utils/parity.js"></script>
|
||||
<style>
|
||||
.box {
|
||||
font-size: 1.5em;
|
||||
text-align: center;
|
||||
border-radius: 0.5em;
|
||||
background: #eee;
|
||||
padding: 1em;
|
||||
margin: 1em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script src="/parity-utils/parity.js"></script>
|
||||
<div class="box">
|
||||
best block #<span id="blockNumber">unknown</span>
|
||||
</div>
|
||||
<script>
|
||||
window.parity.api.subscribe('eth_blockNumber', function (error, blockNumber) {
|
||||
if (error) {
|
||||
console.log('error', error);
|
||||
return;
|
||||
}
|
||||
|
||||
document.getElementById('blockNumber').innerHTML = blockNumber.toFormat(0);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -6,8 +6,33 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="icon" href="/parity-logo-black-no-text.png" type="image/png">
|
||||
<title>dev::Web3</title>
|
||||
<script src="/parity-utils/web3.js"></script>
|
||||
<style>
|
||||
.box {
|
||||
font-size: 1.5em;
|
||||
text-align: center;
|
||||
border-radius: 0.5em;
|
||||
background: #eee;
|
||||
padding: 1em;
|
||||
margin: 1em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script src="/parity-utils/web3.js"></script>
|
||||
<div class="box">
|
||||
best block #<span id="blockNumber">unknown</span>
|
||||
</div>
|
||||
<script>
|
||||
window.setInterval(function () {
|
||||
window.web3.eth.getBlockNumber(function (error, blockNumber) {
|
||||
if (error) {
|
||||
console.error('error', error);
|
||||
return;
|
||||
}
|
||||
|
||||
document.getElementById('blockNumber').innerHTML = blockNumber;
|
||||
});
|
||||
}, 1000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -99,11 +99,10 @@ export default class EditMeta extends Component {
|
||||
|
||||
renderTags () {
|
||||
const { meta } = this.state;
|
||||
const { tags } = meta || [];
|
||||
|
||||
return (
|
||||
<InputChip
|
||||
tokens={ tags }
|
||||
tokens={ meta.tags || [] }
|
||||
onTokensChange={ this.onTagsChange }
|
||||
label='(optional) tags'
|
||||
hint='press <Enter> to add a tag'
|
||||
|
||||
Reference in New Issue
Block a user